Debounce Script Not Working

My Debounce script is not working and I don’t know why someone please help.

debounce = false

script.Parent.Activated:Connect(function()
	debounce = true
	game.Players.LocalPlayer.leaderstats.Strength.Value = game.Players.LocalPlayer.leaderstats.Strength.Value + 1
	wait(1)
	debounce = false
end)

use return so it actually waits that 1 second

debounce = false

script.Parent.Activated:Connect(function()
	if debounce then return end
	debounce = true
	game.Players.LocalPlayer.leaderstats.Strength.Value = game.Players.LocalPlayer.leaderstats.Strength.Value + 1
	wait(1)
	debounce = false
end)

nvm! I fixed it. But thank you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.