I have tried this, but it doesn't work. I'm not sure this is how it's supposed to be :/
script.Parent.Humanoid.Changed:connect(function(p) if p == "Health" then if script.Parent.Humanoid.Health < script.Parent.Humanoid.MaxHealth then script.Parent.Humanoid.Health = script.Parent.Humanoid.Health +1 wait(2) end end end)
Unless you've already scripted the developer product logic somewhere else, you'll need to do that.
HealthChanged
event rather than the Changed
eventlocal hum = script.Parent hum.HealthChanged:connect(function() while hum.Health < hum.MaxHealth do -- won't start if character is already at max health hum.Health = hum.Health + 1 wait(2) end end)