Roblox - When Using UserInput Nothing Happens? [Solved]
Asked by
6 years ago Edited 6 years ago
[Solved by Kiriot22]
Basically I am making a script where when you press enter it will do something. I am using UserInput to do this but for some reason when I press enter it does nothing. I have no errors or warnings in the console. I am using a local script. The code is:
1 | game:GetService( "UserInputService" ).InputBegan:Connect( function (input) |
2 | if input.KeyCode = = Enum.KeyCode.Return then |
3 | print ( "Hey! You pressed enter!" ) |
Any suggestions?
It's in workspace but I think it might need to be somewhere else.