Can someone help me to create a health regen zone? I tried this comand:
`local area = script.Parent
local pisando = false
area.Touched:Connect(function(hit)
wait(2)
local humanoid = hit.Parent:FindFirstChild('Humanoid')
if humanoid and pisando == false then
pisando = true
repeat
humanoid.Health = humanoid.Health + 10
wait(1)
pisando = false
until false
end
end)`
but it has a lot of bugs like, it keeps healing u even when u are not in the zone