The Wiki says KeyDown is deprecated, so what do I use now?
You could use this 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") Or this function onKeyPress(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.R then print("R was pressed") end end game:GetService("UserInputService").InputBegan:connect(onKeyPress)
UserInputService is good, like Yellow said, so go ahead and learn about that service.