What I'm trying to do is when a humanoid's health is above 50, it will try to get to 100 by adding 1 every 2 seconds.
while wait() do
script.Parent.Value = script.Parent.Parent.Parent.Humanoid.Health
end
script.Health.Changed:connect(function() --The value is inside the script
if script.Parent.Humanoid.Health >= 50 then
for i = script.Parent.Humanoid.Health, 100, 1 do
script.Parent.Humanoid.Health = script.Parent.Humanoid.Health + i
wait(2)
end
end
end)
