Skip to content

Enum

Supported Datatype

A data type that represents an individual enum.

Description

The Enum data type represents an individual enum in Roblox. An individual enum can be indexed through the Enums type, via the name of the enum itself.

Methods

GetEnumItems Not yet Returns an array of all EnumItem options available for this enum.
Enum:GetEnumItems()

Returns an array of all EnumItem options available for this enum.

Returns an array of all the EnumItem options available for this enum.

FromName Not yet Converts an enum name to an Enum.
Enum:FromName(name: string)

Converts an enum name to an Enum.

Returns either the converted Enum or nil.

FromValue Not yet Converts an enum value to an Enum.
Enum:FromValue(value: number)

Converts an enum value to an Enum.

Returns either the converted Enum or nil.

Roblox reference: Enum