Hand-written by Joseph San Nicolas, Roblox Developer
Enums
Constructors
| Name | Description |
| Enum | Enums has no direct new() constructor. It is a built-in global singleton accessed directly as the Enum variable in Luau, giving access to every individual Enum by name (e.g. Enum.KeyCode). |
Code Snippet
local allEnums = Enum:GetEnums()
print(#allEnums, "enums available")
-- individual enums are indexed directly off the global singleton
local material = Enum.Material
print(material)
Methods
| Name | Parameters | Returns | Description |
| GetEnums() | Void | {Enum} | Returns an array of all Enums available in Roblox. |