I am attempting to print something upon any key being pressed with the user input service.
Why does this code not work at all?
1 | local userInputService = game:GetService( "UserInputService" ) |
2 |
3 | userInputService.InputBegan:Connect ( function (input, gameProcessedEvent) |
4 |
5 | print ( "1" ) |
6 |
7 | end ) |
Simple Fix! You have everything right, but you misplaced the script.
To fix this, simply put the script in
game.StarterPlayer.StarterPlayerScripts and make sure its a local script.
Here is what I mean:
https://prnt.sc/tcva9j
Just like that :)