Couldn't play animation from the node because it says there is no animation. But there is, i don't know whats wrong.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By stoicmess

I’m new in Godot and am doing a flappy bird tutorial on youtube. I tried to call the animation “fade_out” from the animationplayer, but it gives out null instance. But I already made the animation and it is saved already. What’s wrong here?

Screenshot of the error in script and the animation

The screenshots are missing. You can include code in your post by clicking the “{ }”-icon in the editor on this page.

njamster | 2020-02-11 09:08

I could load the picture by right clicking it, but somehow it doesn’t show right here automatically…

stoicmess | 2020-02-11 09:38

:bust_in_silhouette: Reply From: njamster

Sounds like you’re not getting the right object. Or rather: any object. Make sure, the node path is correct, e.g. if you have a scene consisting of a parent node (where the script is attached) and it’s child of type AnimationPlayer called “A”, your script should include:


Ah yes thank you. Turns out its not referencing the right scene. I forgot to autoload the scene globally.

stoicmess | 2020-02-11 09:46