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

Why is my debounce not working?

local catbounce = false

function clicker() if not catbounce then

	catbounce = true
	
		copy1 = Instance.new("ClickDetector",workspace.button1)
			copy2 = Instance.new("ClickDetector",workspace.button2)
			copy3 = Instance.new("ClickDetector",workspace.button3)
		copy4 = Instance.new("ClickDetector",workspace.button4)
			print("thingy gone")
		
	catbounce = false
	
end
	end
workspace.path1.Touched:connect(clicker)

2 comments

0

Any errors in output?

0

Nope

1 answer

✓ Accepted answer

I believe you need this..

    catbounce = true

if catbounce == true then
        copy1 = Instance.new("ClickDetector",workspace.button1)
            copy2 = Instance.new("ClickDetector",workspace.button2)
            copy3 = Instance.new("ClickDetector",workspace.button3)
        copy4 = Instance.new("ClickDetector",workspace.button4)
            print("thingy gone")

    catbounce = false

end
    end
workspace.path1.Touched:connect(clicker)

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