|
| 04 Jun 2017 06:51 PM |
| lets say you press tab i want it to print ("pressed") |
|
|
| Report Abuse |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 04 Jun 2017 06:53 PM |
| wiki.roblox.com/index.php?title=API:Class/UserInputService/InputBegan |
|
|
| Report Abuse |
|
|
| 04 Jun 2017 06:53 PM |
function onKeyPress(actionName, userInputState, inputObject) if userInputState == Enum.UserInputState.Begin then print("R was pressed") end end
game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.R) -- The above line could also been written as: -- game.ContextActionService:BindAction("keyPress", onKeyPress, false, "r") |
|
|
| Report Abuse |
|