local player = script.Parent.Parent.Parent.Parent.Parent.Parent local character = player.Character local humanoid = character:FindFirstChild("Humanoid") local labelText = script.Parent while true do labelText = humanoid.Health.."/"..humanoid.MaxHealth wait() end
Thanks :D
""..humanoid.Health.."/"..humanoid.MaxHealth..""
local player = game.Players.LocalPlayer --replaced as this is better/easier. repeat wait() until player.Character --Waits for the character to load. You'll need this or else it won't work in game, only for studio. local character = player.Character local humanoid = character:WaitForChild("Humanoid") --Changed to WaitForChild as it will wait for Humanoid local labelText = script.Parent humanoid.Health.Changed:connect(function() --This is better as it will not run a continous loop and cause lag. labelText.Text = humanoid.Health.."/"..humanoid.MaxHealth --This was the problem as well, you didn't have the .Text so it wouldn't do anything end) --This should be a local script btw, I noticed you use the game.Parent.Parent etc, but you could simply do game.Players.LocalPlayer.