I would like to know if it possible to substitute the Enum.KeyCode.(_) in the 4th argument of ContextActionService:BindAction() with an Enum number, like 101 (for the letter E). Like so:
That doesn’t apply to my situation however. I know you can do that, but the way I have it throws up the error: [ContextActionService:BindAction called with an invalid hotkey (should be either Enum.KeyCode, Enum.UserInputType or string)]
I’m not aware of method that allows you specify the type of enum for context action service but you can always just a create a table for it:
local function GetNumberEnums(Enum)
local Table = {}
for _,v in ipairs(Enum:GetEnumItems()) do
Table[v.Value] = v
end
return Table
end
local Keycodes = GetNumberEnums(Enum.KeyCode)