The goal of the script is to project the players help, onto the guis text, plain and simple, but it doesn't seem to work? any ideas?
while true do wait(0.1) local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent local char = plr.Character local human = char.Humanoid local Health = human.Health local par = script.Parent local text = par.Text text = Health end
Thanks
First of all, when it comes to this, I suggest you place this in a LocalScript.
Assuming you are going to do this, here's the code:
local plr = game.Players.LocalPlayer local char = plr.Character local human = char.Humanoid local par = script.Parent par.Text = math.floor(human.Health) human.HealthChanged:connect(function(newhealth) par.Text = math.floor(newhealth) end)
You don't need to use a "while true do" to check the player's health in real-time, you only need a function. Referencing a value only stores a copy of it, therefore editing the copy will not synchronize it to the value in the instance.