Stopping spam click

You can write your topic however you want, but you need to answer these questions:

  1. **What do you want to achieve?**A nuke button which only once then it’ll remove a ui and spawn a nuke

  2. What is the issue? People spam click it een though i have anti spam click measure already

  3. What solutions have you tried so far? Im currently using a tick() debouce where if tick() - lasttick > number then spawn a nuke and set the lasttick to tick()


	local lastime = 0

	script.Parent.MouseButton1Click:Connect(function(GetCar)
		if tick() - lastime >= 76.4 then
			lastime = tick()
			Mod = game.ServerStorage.Tsar
			clone = Mod:clone()
			clone.Parent = workspace
		clone:MakeJoints()
		script.Parent.Parent.Parent.Parent:Remove()
		end
	end)

bear in mind this is a server script

Try a boolean debounce that sets to true when the button is clicked, and debounce isn’t true!

Umm but the gui will be destroyed as intended thus itll yield the current running wait() and so the debounce will never recover

the gui needs to be completely GC-Ed

Bruh completely forgot that my gui will be GC-ed as such no var will stay