While I was making a game, I made a ServerScript inside of a part and wrote:
local function Epress(keyCode)
if keyCode.KeyCode == Enum.KeyCode.A then
print("A has been pressed")
end
end
game:GetService("UserInputService").InputBegan:Connect(Epress)
However, it didn't work when it was supposed to.
So then, I tried doing it on a LocalScript inside of the StarterGui.
Still didn't work.
Help?

1 comment
Thank you!