How to use input.IsKeyDown( KEY_E )

Hello guys!

I’m trying to do if someone press E then it’s gonna Print a message in the Console

The problem is that, if someone changed his “USE BUTTON” key then it’s won’t work.

I heard about : input.IsKeyDown(IN_USE) But it’s not working

[lua]
if input.IsKeyDown( KEY_E ) then

print(“It’s Work”)

end
[/lua]

GM/KeyPress

Example #1 is what you’re looking for.

You can also use Player:KeyDown( IN_USE ) if you need to check in a certain instant. Use the hook if you want it to run something every time the key is pressed.

Make sure it’s being run Clientside otherwise it’ll give you an error.