function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == 13 then
print("enter")
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
The enter key is 13 but this doesn't work so what do I do. I am just trying to print "enter" then the player presses enter.

3 comments
where is this code located?
^
Localscript