Answered by
6 years ago Edited 6 years ago
KeyDown is deprecated and will no longer work, we now have to use userinputservice.
(Userinputservice is client only!)
1 | local UserInputService = game:GetService( 'UserInputService' ) |
3 | function onInputBegan(input,gameProcessed) |
4 | if input.KeyCode = = Enum.KeyCode.Up then |
9 | UserInputService.InputBegan:connect(onInputBegan) |
You can see I use Enum for the keycode, you can find the keycodes here
But these are the ones you need
To do the normal stuff (letters) you can simply do this
There are more things you can do with it, but these are the things you need.
If you have a question, just ask :)