Hello, i don't know what is the problem in my script but help me! thanks.
local mob = script.Parent.Parent.Parent.Parent.player.Humanoid.Health
local mobmax = script.Parent.Parent.Parent.Parent.player.Humanoid.MaxHealth
while true do
wait(0.01)
script.Parent.HealthNum.Text = math.floor(mob) .. " / " .. math.floor(mobmax)
local pie = (mob / mobmax)
script.Parent.Healthbar.Size = UDim2.new(pie, 0, 1, 0)
end

1 comment
What is happening? What do you want to happen? Are there any errors in the output?