Pass a keycode value through a remote event?

Hello, I need to pass a keycode value through a remote event that goes something like this:

Local Key = “E”

RemoteEvent:FireClient(player, Enum.KeyCode … Key) < something like that. (How can I turn a string value into a keycode value?)

Are you passing the entire “Enum.KeyCode.E” to the FireClient() function? When the string value of “E” is received by the OnClientEvent event handler do:


You could also just do the following:

local Key = Enum.KeyCode.E
RemoteEvent:FireClient(player, Key) 

Pass the entire KeyCode enumeration as an argument to the FireClient() function call.

1 Like

Thankyou yet again :slight_smile: You legend.