I am having a bit of difficulty with checking for keypresses, I have some code that is supposed to check for a keypress every tick, but I am not sure how to check for the actual keypress:
function onKeyPress(actionName, userInputState, inputObject)
print("R has been pressed")
end
game.ContextActionService:BindAction("keyPress",onKeyPress, false, Enum.KeyCode.R)
runService.RenderStepped:connect(function() -- update every 1/60 of a second
if [not sure what to do here] then
--do something
end
end)
Also a mini question here, is there any way to program everything instead of using small scripts everywhere?

4 comments
Can you explain the "IsTyping" part?
It is the second parameter given when InputBegan is fired. It indicates if player input was caused due to them interacting with UI. The common parameter name is 'gameProcessed' and is not only for checking if a player is typing in chat.
So forgot to ask one last thing, how will this know who is typing?
Never mind, ignore that, I was just being stupid and didn't realize this was supposed to be in playerscripts