How can I have my HP bar decrease without the texture getting squished

I have this HP bar:
image

But when I decrease the size, the texture gets squished like so:
image

How would I setup the hp bar for that not to happen?

2 Likes

maybe the one in the front should be not the Black bar in the back.
so the red bar is in the back, (when the HP decrease The back bar will change size and not the red one). but sure now the black one will be Squished

Check out my solution here:

1 Like

Change the texture’s ScaleType to Enum.ScaleType.Tile. Your gui texture will then act like the texture object.

1 Like

You mean Crop, cause that worked, thanks for leading me the right way.

Crop does not solve what you are trying to do here. Crop uses the size of the image itself, then crops out anything else. You should use Tile as I said.

Just change the tile size to whatever you wish.

While using crop, your texture gets larger as the size becomes larger, and vice versa.

image
Crop is what I want, title didn’t achieve this result.

Is crop achieving the same thing as stretch? If so, you have to change the tile size to offset for this to work. By default, its both scale 1,1. But if you want crop thats fine.

1 Like