local plrs = game:GetService("Players") local plr = plrs.LocalPlayer local character = plr.Character or plr.CharacterAdded:wait() local hum = character:WaitForChild("Humanoid")
local health = hum.Health
local interface = {} do local playerGui = plr:WaitForChild("PlayerGui")
local gui = playerGui:WaitForChild("HealthBar") local frame1 = gui:WaitForChild("status") local text = frame1:WaitForChild("healthpercent") local status = frame1:WaitForChild("overlay") local Udim2_new = UDim2.new function interface:UpdateHealth() status.Size = Udim2_new(health/100,0,1,0) text.Text = ("Health: %d / 100"):format(health) end
end
interface:UpdateHealth() wait(.5)
It has no errors, but it isn't actually updating the text on the UI itself. Any help is appreciated :)