Hello,
I am currently trying to make an event start when i click a key.
I have tried looking up other scripts, i tested them, but non of them work.

If someone could help me i would really appreciate, i have been trying for almost an hour.
Hello,
I am currently trying to make an event start when i click a key.
I have tried looking up other scripts, i tested them, but non of them work.

If someone could help me i would really appreciate, i have been trying for almost an hour.
KeyDown is deprecated, use the UserInputService version of it (.InputBegan)
Anyway, use a debounce to make a cooldown
local UIS = game:GetService("UserInputService")
local debounce = false
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Q then
if debounce then return end
debounce = true
event:FireServer(12)
wait()-- add a number
debounce = false
end
end)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.