local thispart = script.Parent
local Debounce = false
function oof(theplayer)
if theplayer.Parent:FindFirstChild("Humanoid", false) and Debounce == false then
Debounce = true
theplayer.Parent.Humanoid.Health = theplayer.Parent.Humanoid.Health - 10
print("you're dying")
Debounce = false
wait(2)
end
if theplayer.Parent.Humanoid.Health == 0 and Debounce == false then
Debounce = true
print("game over!")
Debounce = false
wait(1000)
end
end
thispart.Touched:Connect(oof)
this doesn't work for some reasons

2 comments
Could you elaborate on what’s not working?
it prints you're dying for 77 times when i touched the part :/