Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Assistance needed on my debounce script. It keeps repeating it self over and over?

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)

1 answer

✓ Accepted answer

Typo. Simply fix this script by adding a local before debounce on line 1.

2 comments

0

I've added a local but it still does not stop repeating

0

nvm did some more testing and figured out it was only doing it after 5 seconds and i only need it once

This discussion is preserved as it was. New answers, comments, and votes are closed.