I'm attempting to bind an action using a value as the key needed. It's not working... From what I see in the console, there shouldn't be a problem with it.
So my question is this: Am I doing somthing wrong or is this a possible Roblox bug, and if so, how do I proceed?
\/(The value of "KEY" (a string value) is "Enum.KeyCode.E")\/
local Context_Service =game:GetService("ContextActionService") Context_Service:BindAction("Name",Function,false,workspace.KEY.Value)
Pressing "E" does absolutely nothing, the function will not fire.
Can't test it right now, but hopefully it works. Let me know if it doesn't.
local Context_Service = game:GetService("ContextActionService") local keyValue = game.Workspace.KEY.Value Context_Service:BindAction("Name", Function, false, Enum.KeyCode[keyValue])