even though my debounce script is an exact copy of a script that works it won't work it stills is repeating like this:
hi (24x)
heres my code:
debounce = false
script.Parent.Touched:Connect(function(hit)
if not debounce then
debounce = true
if hit.Parent:FindFirstChild("Humanoid") then
print("hi")
end
end
wait(5)
debounce = false
end)

2 comments
I've added a local but it still does not stop repeating
nvm did some more testing and figured out it was only doing it after 5 seconds and i only need it once