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

How do i make it so it doesnt look for input and waits till it does again?

UIS.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		mouseDetection:FireServer()
		wait(3)
	end
end)

1 comment

0

Personally I'd use boolean for that

1 answer

✓ Accepted answer

Personally, I'd use boolean for delays.

local UIS = game:GetService("UserInputService")
local Delayed = false
local DelayTime = 3

UIS.InputBegan:Connect(function(input, GPE)
	if not Delayed then -- if delayed is false
		-- Code goes here
	else -- If delayed is true
		wait(DelayTime)
		Delayed = false
	end
end)

(Note: This script wasn't tested)

1 comment

0

It only runs once and doesnt run after

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