I want to Tween the material of an object. To do this, TweenService wants me to give it an integer value for the material (for example, SmoothPlastic’s Enum Value is 256)
The problem is, after i tween it to a material such as neon, i need it to return to its original Material. To do this, i store a variable prior to the tween (OldMaterial = i.Material) for use later when i tween it back. But it once again needs an integer value for the tween, so that means somehow i need to get an integer from the part’s material value. (So for example, if the material was SmoothPlastic, i would need a way to get 256 from that in order to tween it)
Does anyone have any ideas on how to do this? i cannot find any converters/constructors in the roblox Lua documentation.