Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

[SOLVED]How do I get the name of an Enum with its associated number? [closed]

Asked by
Minifig77 190
10 years ago

Quite simply, I want to know if retrieving an Enum's name using its number is possible, and if so, how I can do it.

Example: The SoundService's AmbientReverb ReverbType property "NoReverb" has an Enum value of 0. Using just its associated number 0, could I retrieve its name, NoReverb?

Locked by TheMyrco

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
-2
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
10 years ago
print(Enum.Material:GetEnumItems()[1])
Ad