I need halp with my code that i have been trying to solve for a couple of hours

File was renamed to FileAccess in 4.0, chat gpt gave you old 3.0 code.

Make sure to format your code

I think you will want this

if FileAccess.file_exists("res://close_stars_and_planets.json"):
    var file := FileAccess.open("res://close_stars_and_planets.json", FileAccess.READ)
    json_data = JSON.parse_string(file.get_as_text())
2 Likes