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

How to make a custom Health GUI that is just based off of a number?

So I am creating a health GUI that is just based on a number.

This pic should explain things: http://prntscr.com/3drmjb

Someone gave me this script: Humanoid.Changed:connect(function(Health) blah end)

So can anyone help?

2 answers

well that would be very advanced by using an onTouched sword or bullet script by damage and find the number of health

1 comment

0

So think you could help...?

It's not that hard. No functions are needed. Just put a script inside the Gui (which should be in starterpack). It's best if the script was a LocalScript.

Here's what you do:

local youtheplayer = game.Players.LocalPlayer;
local youthecharacter = youtheplayer.Character
local yourhealth = youthecharacter.Humanoid.Health

while wait () do -- goes on forever
	script.Parent.Text = yourhealth -- makes the text the same as your health. 
end

Don't forget to click "Accept as answer" once your question is satisfied. It's near the voting system for answers.

1 comment

0

Doesn't exactly work. I need the numbers go down as the person gets killed.

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