Custom Health Bar Decrease effect?

Hello! I’ve always loved custom UIs and such, but never learned anything besides simple bars (with tween animations for decreasing/increasing that bar)
Today, I wanted to make an HP bar that basically looks like a battery.
I went into my editing program, made some neat UIs and then, I remembered.
I don’t know how to make a custom Health bar

Screenshot_2

  • What do I want to know?
    Basically a tween to make the HP_Bar decrease. Normally, I’d know how to do that, but for this, it’s not a rectangle, so Is there any way to make the Bar go down?
    I’d do this with a tween that scales the image down, but as I said before, it’s not a normal rectangle to just make it smaller

EDIT: For reference, this is What I’m trying to do:
Screenshot_1

That’s very simple to do…
Just do this.

	Player.PlayerGui.MainGui.HealthFrame:TweenSize(UDim2.new(Player.Character.Humanoid.Health / Player.Character.Humanoid.MaxHealth,0,1,0))

I don’t know the exact way to go about this but I do know there is a ClipDescendants property for frames and maybe that can help

you are partially correct.
While showing me how to decrease the HP bar (I already knew that), you’re basically scaling it down, which would look like this:
Screenshot_3

After some looking through the Roblox Properties Tab, in the “Image” section, there’s a “ScaleType”, fixed it by changing it from “Stretch” to “Crop”

1 Like

I thought you have already did the property ui :sweat_smile:.
You asked for a script that would make a health ui.

sorry if I was unclear, I said I did know how to make a script, yet I didn’t know “Crop” Scaling existed, and came here to ask if there’s a way.

Well this is scripting support category not UI Design.

Excuse me, at first I thought it had something to do with scripting.
Still, HPBar.ScaleType = "Crop" or something like that could be implemented in a script