i’m trying to make a game that has a health bar in the top right. When the health is pretty high it looks normal but when the health gets too low it just goes off the bar. Does anyone know how to fix this? here is my code:
First of all, if you haven’t already, center your costume like this:
Then, you can remove the final block, leaving this code:

If the health is a negative value, it will begin to go off screen. to prevent that, you can do something like this:
Unrelated, this should be in Help with Snap! > Snap! Editor ![]()
Okay, thanks for telling me!
Yeah, it worked, thanks.
If @da-ultimate-creater solved your problem, set the tag to Help with Snap! > Snap! Editor then label what he had said with “solution”
okay.
But with this method, you doesn’t have red in your bar…
A few months ago, i’ve made this project.
If you stick to the solid color 10x1 health bar and stretch it
.
If you think that the antialiasing/gradient-like effect is unpleasant, you may create the shape directly
I like the 2nd one, thk a lot.
All I did was use a separate sprite that was the same size as the health bar at 100%
But I still think the ones you suggested is still pretty cool.





