How would I achieve this?

that would require 100 images for every possible player health

Not really. It would probably require ~5. The different hearts could be duplicated rather than have one for each health level. Similarly to how it’s done in Minecraft.

i mean the red part gets closer to the top with the % of health the player has, so 100% is fully read, 50% is half and so on, i could make like 10 images and round it to the closest however

image

You want it like this, but reversed, right?

i want the inside of the heart to be being filled from bottom to top

Create a filled version of the heart icon, white, and use a uiGradient on it.

i dont work with ui often, could you explain how this would work

If you are talking about filling the image, no, you can’t do it in Roblox.

Roblox also doesn’t support UI masking, so your only option is to make 2 images: the outline, and the fill.
You then composite them together in Roblox to make your health UI.

As for making it fill, you use UIGradients, and I’ll quote myself from another post that had this problem:

I’ve got an idea on how this would work, I made this with two images from the toolbox.

image

Gradient configuration:

1 Like

Use whatever tool you used to create the outlined heart icon to create a filled version, solid white. Then use the UIGradient on that.

The reason the UIGradient wont work on the outlined heart you have is because it only has an outline to color in, if the image is filled, it can color the whole thing.

would this allow me to change how much of the heart is filled in

A gradient would allow you to change how much the heart is filled in.

1 Like

how did you make the ui only inside the heart

It’s another image that’s takes place of the transparency inside of the heart

i dont understand, i dont work with ui

So basically, the inside of the top heart image is transparent (see though), and there is another heart underneath the heart that doesn’t have a transparent inside.

image

i ended up with this, how can i make only the ui that is inside the heart be visible

There’s supposed to be another image label underneath that heart decal that’s the shape of the heart.

i got it thanks

dsafsaaaadaffafafs

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.