Hello! I am tring to convert Enum to string (Enum.Material.Sand must become “Sand”) to put the string in a stringValue instance but it don’t work correctly. When I use tostring(Enum.Material.Sand), I get “Enum.Material.Sand”. Can you help me please?
2 Likes
Yeah use .Name
print(Enum.Material.Sand.Name)-- "Sand"
print(typeof(Enum.Material.Sand.Name))-- string
--outputs "Sand" in string
23 Likes