0 votes

My script worked fine before, but suddenly it crashes as soon my Kinematicbody2d hits the floor and it wants to play a sprite.

It's a script error, but i have no idea what to do about it.

Whenever it runs $Sprite.flip_h or $Sprite.play it crashes.

in Engine by (103 points)
edited by

can you elaborate a little bit more?

1 Answer

+1 vote
Best answer

It means the node called Sprite does not exists as a child of the node with the script, check your tree (or the remote running one).

by (7,922 points)
selected by

Got it figured out, thanx for pointing me in the right direction.

I renamed my Sprite node, changed it back to Sprite. Problem solved. XD

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.