local head = script.Parent:WaitForChild("Head")
local HpBoard = Instance.new("BillboardGui",head)
HpBoard.StudsOffset = Vector3.new(0,3,0)
local HPLabel = Instance.new("TextLabel",HpBoard)
HPLabel.BackgroundTransparency = 1
HPLabel.TextScaled = true
HPLabel.TextColor3 = script.Parent:WaitForChild("TeamColor3").Value
while true do
wait(.5)
HPLabel.Text = script.Parent.Humanoid.Health.." / "..script.Parent.Humanoid.MaxHealth
end
You just want to make a script that detects when this changes inside of the gui and get the player from there. You can detect a value/property change by using Instance | Roblox Creator Documentation
It appears that you haven’t defined a size for the UI objects, meaning they are infinitely small and therefore invisible. If you try setting the size of the BillboardGui and the TextLabel to UDim2.new(1, 0, 1, 0), the objects should appear.