local inputServe = game:GetService("UserInputService")
inputServe.InputBegan:Connect(function(input, gameProccesedEvent)
if input.KeyCode == Enum.KeyCode.G then
print("G pressed.")
end
end)
There is no errors that happened. It's in a local script, and its in starterplayerscripts

5 comments
I actually copied your original code and it worked just fine, perhaps there's something else wrong with your code?
This is not really an endearing question..
Things to check: Is script disabled? Is there inf loop before this code (common mistake)? Is this function firing at all (put print before if statement)? Is your keyboard working properly?
what happened here
erease ", gameProccessedEvent" and it will work