Sprite not showing up in preview

I am testing an Undertale-like game, but the HP bar won’t show up in the preview mode.

Here are some pictures:
(Top: Edit mode)
(Bottom: Preview mode)

You will need to show the related events if you want help.
Otherwise, you can try GDevelop Problem Solver by Gruk

Here is a picture of the events. As you can see, I have already tried fixing the problem, but it did not work.

I think the animation changing action takes an integer, not an string

@Midhil, set animation takes a string. It’s “set the number of the animation” that takes an int. Whicj I think should have been used.

@Digifox08, you can combine the 6 set animation events into one action, with no conditions:

Set the number of the animation of HP to Variable(HP)

1 Like

thank you, but what about it not showing up in preview? I do not have any animations that are completely black.

So your animation 0 is not empty?

And did you name it 0?

I just realized what the problem was. I have no idea how, but it appears one of the sprites for the health bar disappeared. Sorry for the trouble everyone!