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
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)