May 3, 2020, 2:04pm
Is there a way to get all the enumeration items of Instance types?
For example to get all enum. items for Font (i.e font styles) we would do :
for _, fontName in ipairs(Enum.Font:GetEnumItems()) do
Is it possible? Or would I just have to use an array containing all the string names of possible instances?
May 3, 2020, 2:15pm
Unfortunately, I don’t believe there is any native way to get all possible enumerations like that. Your best option would probably be to list them all inside of a ModuleScript containing an array, which can then be required to get the list.
See reply below.
You can find all current enumerations on this page:
May 3, 2020, 2:18pm
You can get a table of all enumeration types using
@0skarian, there is definitely a way to get all Enums:
for i, enumItems in ipairs(Enums:GetEnums()) do
for i, enumItem in ipairs(enumItems:GetEnumItems()) do
Hope that helps!
May 3, 2020, 2:24pm
yeah but what if you only wanted enumeration items of only instance types, take it this way:
for example to get all values of x where doing Instance.new(x) would be valid
May 8, 2020, 10:25am
I came to the conclusion that there is no way of doing this, at least yet