Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would i make a my own Heath Bar Gui?

I have thought and tried many things but haven't got any of them to work. Anyone have any answers?

2 answers

Depends what kind of thing you're after, but if you just want it to get smaller in comparison to the players health use something like this

PlayerGui -ScreenGui --HealthBar -- define size and set background to red ---Bar -- set size to {1, 0}, {1, 0}; ----localscript

in the localscript use this code;

local player = game.Players.LocalPlayer.Character

player.Humanoid.Changed:connect(function()
	script.Parent.Width = UDim2.new(player.Humanoid.Health/player.Humanoid.MaxHeath, 0) -- use height for vertical health bars.
end)

Well, first you have to disable the health bar in the CoreGui through an action called SetCoreGuiEnabled()

Once you've set your health bar gone; you can make your own health gui. What I personally do is use a changed function and have the 'health' gui size based on percentages of your health through the gui. Make an attempt first then put down your source here.

This discussion is preserved as it was. New answers, comments, and votes are closed.