where should i add a wait before pressing q for this thing to run again?
mouse.KeyDown:Connect(function(key)
if key == "q" then
print("ITWORKED")
wait(5)
end
end)
where should i add a wait before pressing q for this thing to run again?
mouse.KeyDown:Connect(function(key)
if key == "q" then
print("ITWORKED")
wait(5)
end
end)
Use UserInputService
In a LocalScript ClientScript
local UserInputService = game:GetService('UserInputService')
local Debounce = true
UserInputService.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.Q and Debounce then
Debounce = false
print("that's work.")
wait(5)
Debounce = true
end
end)
Hope this help, to more questions put bellow on commentaries.
nah, remove that keyboard part
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
as alvinblox once said, put it in the start of your script- wait.. u would need a debounce
Why are you using KeyDown in 2020
OMG BEST OUTDATED SCRIPT ABOVE!! SO COOL XXDD
@Feahren lol