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

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

Asked by
InteWv 0
10 years ago

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

Log in to vote
0
Answered by 10 years ago

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

0
So think you could help...? InteWv 0 — 10y
Ad
Log in to vote
0
Answered by
Maxomega3 106
10 years ago

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.~

0
Doesn't exactly work. I need the numbers go down as the person gets killed. InteWv 0 — 10y

Answer this question