Skip to content

Data type

Enum

Official docs ↗

A data type that represents an individual enum.

About Enum

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 3

  • GetEnumItems() → ArrayReturns an array of all EnumItem options available for this enum.

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

  • FromName(name: string) → Enum | nilConverts an enum name to an Enum.

    Returns either the converted Enum or nil.

  • FromValue(value: number) → Enum | nilConverts an enum value to an Enum.

    Returns either the converted Enum or nil.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.