Debounce is not working

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)

Touched might be detecting non-player parts that are touching it as well, only activate debounce when a player touched it:

part.Hit1.Touched:Connect(function(hit)
		if de then return end 

		if hit.Parent:FindFirstChild("Humanoid") then
de = true -- activate if player found
			hit.Parent.Humanoid:TakeDamage(100)

			--plr.Stats.XP.Value += 10
			print("hi")
wait(5)
		de = false
		end
	end)

just tried it, still doesn’t seem to work.