I have a radius that when it's touched by the creator its supposed to heal the player by 10 health for every second that the player is still touching the garden, and if they aren't the creator it does the same thing except it hurts the player. My script isn't working, what am I doing wrong?
GardenO.Touched:Connect(function(Hit)
local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
if Humanoid == nil then return end
if Humanoid.Parent == Character then
if deb == true then return end
deb = true
print("Local Humanoid Touched")
pcall(function()
Humanoid.Health = Humanoid.Health+10
wait(1)
end)
else
if deb2 == true then return end
deb2 = true
print("Humanoid Touched")
pcall(function()
Humanoid.Health = Humanoid.Health-10
wait(1)
end)
end
wait(5)
GardenO:Destroy()
deb = false
deb2 = false
end)

1 comment
this won't work if multiple players are touching the part