Cannot instance script because the associated class could not be found

Godot Version



As the title , I know it’s an old question, but my “script name” is same as “class name”, and it still didn’t work!Help.

Did you just move the script into that folder? I had this issue before, and it was because the editor didn’t update location references when I moved .cs files around.

Open your .tscn file and make sure the script path is pointing at the correct location.

Look for:
[ext_resource type="Script" path="res://Player.cs" id="someid"]

No, I build the script in the “Scripts” folder.

Yes, it exist.