Help with Heath Bar

I need to make a health bar GUI that the fill will be scaled depending on the health. The problem is that the gui isn’t a square
image
Basically what I need is to make it so the size of the image stays the same and it is cropped by the size of the frame. Thanks!

1 Like

Here’s a solution I’ve posted to this issue before:

1 Like

I may have done it wrong, but this is how it turned out -
image
image

1 Like

Looks like the cutoff is in the right spot, -0.9 offset would be 10% health which should be about there. Is the rest of that red fading brighter towards the right-hand part of the image below it?

yeah the 10% thing is right, but it fades to get brighter as it goes to the right instead of staying faded out

1 Like

Try adding the same kind of cutoff, but right at the beginning. So, time 0 is transparency 1, time 0.001 is transparency 0.

still not working
image
did i graph it wrong?

1 Like

Is the image behind the healthbar also red in color? Does making the part with this gradient not visible remove that unwanted red?

You could also do this same logic but with graphing the Color value of it. Like, same cutoffs, but instead of transparency going from 0 to 1, the color can go from fully white to fully black, or whatever looks best.

1 Like

I fixed it by changing the graph a bit

1 Like