im trying to make it so when someone touches a part they die
but the touch event keeps running as their on the part
i want it to only run once
i did research and adding a debounce should work, so i added one but it still doesn’t work
local de = false
part.Hit1.Touched:Connect(function(hit)
if de then return end
de = true
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid:TakeDamage(100)
--plr.Stats.XP.Value += 10
print("hi")
end
wait(5)
de = false
end)