I'm trying to make a "hitbox" that stops taking health when you step out of it, though when you step out of it, it just keeps taking health, any solutions? here is my script:
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
while hit.Parent.Humanoid do
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 1
wait()
end
end
end)

1 comment
thankie