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?
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?
well that would be very advanced by using an onTouched sword or bullet script by damage and find the number of health
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.
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.
1 comment
So think you could help...?