I'm building a game, and I really don't feel like typing out 40+ different things so that I can do this event, is there a short cut? And if so please link/describe said shortcut :) Thanks! -deputychicken
✓ ANSWER ACCEPTED
Hey guys! I was wondering: How can I do a "press any button to continue" event?
1 answer
✓ Accepted answer
knowing that this is how you use InputService.
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.R then
print("R was pressed")
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
then we can assume by taking out the IF gate, it will fire every time!
function onKeyPress(inputObject, gameProcessedEvent)
print(inputObject)
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
You might want to add a logic gate to control if its just the mouse being moved or clicked though. I have no idea if the mouse is still technically a user input. I just use the local mouse
I appreciate it so much! Thanks bro. :)