Health BillboardGui

I want it to display the amount of health the player has ontop of their head (just the number so if i have 50 of health then it will say 50)

The Billboard appears but it stays as the default text I put in the beginning and if I lose damage that does nothing, https://gyazo.com/34f0f813ee963eeb42668868e25ecf54 and https://gyazo.com/280ed3fa2940970d3b596e58515f187e

I cannot figure it out its been 3 hours I’ve been trying to fix this and I’ve looked all over yt and the devforum and nothing works so this is my last straw

-- This is a local script
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character
	
script.Parent.Parent = char.Head

local Humanoid = plr.Character:WaitForChild("Humanoid")
local Health = Humanoid.Health
local MaxHealth = Humanoid.MaxHealth
local HealthGui = script.Parent.GUI.HealthGUI.HealthNum

while true do
	wait()
	HealthGui.Text = Health
end

local Health = Humanoid.Health This will set the value to be the Health so if you have 50 health. then printing it would say 50

print(Health) > 50

local plr = game:GetService("Players").LocalPlayer
local char = plr.Character
	
script.Parent.Parent = char.Head

local Humanoid = plr.Character:WaitForChild("Humanoid")
local HealthGui = script.Parent.GUI.HealthGUI.HealthNum

while wait() do
	HealthGui.Text = Humanoid.Health .. " / " .. Humanoid.MaxHealth
end
3 Likes

oh my god thank you, ima do a little bit of tweaking so i can get the results that i’m looking for.
seriously thank you man, a real homie

No worries, Just keep in mind that setting a variable to be equal to a value property will not update the Variable when it is changed.

1 Like

alright thanks g it looks awesome

1 Like