I want the text label to show me the health of the NPC but when I go into the game and hit the NPC its health keeps switching to random numbers and sometimes the number won't be a whole number
My Script for the text label which is just a normal script:
humanthing = script.Parent.Parent.Parent.Parent.Humanoid
humanthing.HealthChanged:Connect(function(newhealth)
local maxhp = humanthing.MaxHealth
while wait() do
script.Parent.Text = newhealth
end
end)
