Default health not regenerating?
So I gave up on the custom health gui and just decided to stick with the default one roblox gives you and whenever I play in studio it gives my character a script called "Health" which contains this
03 | local REGEN_RATE = 1 / 100 |
08 | local Character = script.Parent |
09 | local Humanoid = Character:WaitForChild 'Humanoid' |
14 | while Humanoid.Health < Humanoid.MaxHealth do |
15 | local dt = wait(REGEN_STEP) |
16 | local dh = dt*REGEN_RATE*Humanoid.MaxHealth |
17 | Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth) |
19 | Humanoid.HealthChanged:Wait() |
I have made no changes to this yet the health still wont regenerate when I get hurt i've been trying to fix this for hours help