#My Scripts can't find the nodes I'm refering to, even though it works on the tutorial.
6 messages · Page 1 of 1 (latest)
But actually, I would imagine that what the tutorial maker intended was for you to put Main.gd on the root node of the scene (the one called Node2D) instead of on the Pet node.
So here's what you should do:
- remove the script from Pet by clicking the script button with a red X above the scene tree
- Drag
Main.gdonto the root node - Change like 53 to
var texture = anim.sprite_frames.get_frame_texture(anim.animation, anim.frame)
Doing this gave me these 2 errors. I dont know if there are any more because I haven't attempted to further run the script yet.
Ok, that's probably from another part of your script that you didn't show in the first picture, can you show the whole thing?