Animation Frame (sprite) in UI stuck in a frame.

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

Hi everyone! Im new to Godot (and programming in general) and I’m following a 2D RPG game tutorial but I’ve met an issue with the UI of Godot:

I’ve been setting up the frames for an AnimationPlayer and suddenly when I tried to make a new animation, I became unable to change the Frame with the up and down arrow buttons in the right tab of the Sprite where the texture is located. It got stuck in the 12th frame from the last animation and now every time I press the up or down button it immediately switches back to the 12th animation.

I can still do the animation by going inside each of the frames in AnimationPlayer and change it manually but the preview there is too little and Godot do not longer identify the following frame as before.

:bust_in_silhouette: Reply From: shubhamtiwary914

I was stuck in a similar problem, although it wasn’t much of a problem, I think this might help for anyone else as well.
Try this in your _ready(recommended) or any other function:

get_node('Sprite').frame = some_frame_no_you_want;

There may be some other alternative, but this is just a one liner, so no problem right?