Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to make a custom health?

Asked by 9 years ago

I need to know how to make your own custom health

0
Custom health bar? systematicaddict 295 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

Please don't make requests on this site, your "question" sounds too much like a request.

In order to make a custom health bar you will need to have created the gui first before you can script it. Once you have that, you can have a script similar to the following to resize it to make it act like a health bar. You will need to change the path to the gui of course. This will be a localscript.

player = game.Players.LocalPlayer
hum = player.Character.Humanoid

hum.HealthChanged:connect(function()
    YOURBAR.Size = UDim2.new(0, math.ceil((hum.Health / hum.MaxHealth) * 100), 0, 20) -- replace 20 with the height of your gui bar that is to be resized and also change the path to make it work
end
Ad

Answer this question