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

How do I get a player's health via LocalPlayer?

I've got a local script, and I want to get the LocalPlayer's health for a Gui, but game.Players.LocalPlayer.Health comes up inconclusive because Health isn't one of the properties of LocalPlayer. How can I use LocalPlayer to find his current Health?

2 answers

✓ Accepted answer

game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Health

1 comment

0

if you intend on having it loop, use while wait() do end

e = game.Players.LocalPlayer:WaitForChild("Humanoid") e.Health

-- ADVICE , If you want to know his health via gui you can use his health gui, we all have one

HealthGUI = Player.PlayerGui:FindFirstChild("HealthGUI") if HealthGUI ~= nil then -- Do what you want! Just an advice since you're using guis

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