How do i bypass this

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I would want to fit this health bar into my custom gui.

  2. What is the issue? Include screenshots / videos if possible!
    The health bar is sticking out.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Yeah I did, but none of them were related to this issue.
    Using imagelabel-ed healthbars isnt my style and just by thinking about it I know it wont work.

Im new to the devforum, so feel free to call out any mistakes in my post!

Have you tried making the green bar the size of what it’s sticking out from?

Yeah, but then theres some empty space. I tried using ClipDescendants on the image but roblox doesnt clip image-wise

Do that and fill in the empty spaces, would that work?

How do I fill in the empty spaces? But if I do fill in the empty spaces, the health bar wouldnt look so nice in game. As an example, like the player has 50% health, theres the thing I used to fill in the spaces. The health bar is half but theres that small chunk left at the far right end.

1 Like

I’m not completely sure if this would work but,

for the extra images covering the white spaces why not do a script saying something like

if plr.Humanoid.Health == then
—-additional images covering white spaces name here.Visible = false

for the “ “ after saying ==, you should put whatever the health would be in which the additional images would still show.

In other words, whenever the additional images would show, for instance at like 95% health the placeholders would show, so you would put 95 in the space.

Not completely sure if the code would work but you can try.

I think the easiest solution would be to make the green bar the full size of the gui, and the same shape (make it into an ImageButton or something)

Then, instead of increasing its size on the X axis, simply move it from left to right depending on the percentage.

Finally, the outline Gui should have ClipDescendants enabled so the green bar isn’t visible at a lower %

Thanks, it worked. 30carsssssssssssssss

1 Like