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)

1 comment
Remember to indent code, it looks nicer :)