Title describes it all.
I am trying to store an EnumItem object as a Value object. I plan to use it to store keycodes. Such as Enum.KeyCode.E
Now, the problem is that: It is not possible to store EnumItem in values easily. The closest way would be to use IntValues and using the Value of the Enums to work with it. But that's just a waste of code to retrieve back the original Enum even if I know what type it is.
Though, I could change my code to check for Enum Values of a keypress, but BindActionContext requires you to specify Enums. Which is just counter intuitive.....
Also, seems like Enum are seperate object types, as doing Enum.KeyCode.E == Enum.KeyCode.E.Value returns false.
have 2 stringvalues, 1 of them for the name of the enumeration, the second for the value, to load them:
local enumeration = script.Parent.CoOlEnUm.Value local enumvalue = script.Parent.cOoLvAlUe.Value local final = Enum[enumeration][enumvalue]