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

How to make a person click a certain amount of times before an action happens?

how do you make it so a person would have to click a few times before there is an action that happens

3 comments

0

please attempt this before posting

0

i have attempted it many times that why im posting it on here

0

Well, use click events and every time they click add to a number variable called "Clicks" then check if Clicks == then if so do this.

1 answer

✓ Accepted answer
local clicks = 0
local mouse = game.Players.LocalPlayer:GetMouse()

mouse.Button1Down:connect(function()
	clicks = clicks + 1
	
	if clicks == 5 then
		print("Five clicks have been made!")
		clicks = 0 -- Resets the click count.
	end
end)

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