How do I use and implement the animation player?

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


I made a simple animation in the animation player and when I play the animation it works but when I run the preview it doesn’t play the animation.
So here is my question: do I have to put the animation scene in the aoutoload or attach a script to the animation player with the appropriate code in it or how do I get it to play in the preview of the scene? And if I have to write a code to get it working what do I have to write?
I hope someone can explain me and help me solve my problem.

Thanks in advance!

:bust_in_silhouette: Reply From: Rensae

First of all, do you only have an animation player in your scene ?

Animation player works with a SpriteSheet ideally, on a Sprite Node.

If you only have one animation, you could use an AnimatedSprite instead. It’s simplier to use, but you have less control over it.

You can also use AnimationTree to append animation together, but that’s only if you have multiple animations.

This one is for AnimationTree.

Here is my scene structure

This is my scene structure:

NotNEo | 2021-09-30 15:38

This is what happening:
Imgur: The magic of the Internet

NotNEo | 2021-10-03 10:02