[Improved] Custom Enum

This tutorial will guide you through creating and using custom Enums in Roblox using Lua scripting. Custom Enums allow for better organization of your code and can make your projects more modular and easier to manage.

Now EnumItem is number it’s can send via RBXScriptSignal

Example

local Enum = require(path.to.Enum)

return Enum.new('ExampleEnum', {Default = 0, Foo = 0}) or Enum.new('ExampleEnum', {"Default", "Foo"})

Usage

Plugin

This plugin automatically includes both default Roblox Enums and your custom Enums, allowing for seamless integration and management of Enum types in your game.

New Update now you can put Enums files to anywhere

Basic setup for custom typeof()

local Enum = require(path.to.Enums)
Enum() <-- Done

print(typeof(Enum.Graphics), typeof(Enum.Grahics.Low), Enum.Graphics.Low) -> (Enum, EnumItem, number (13072))


print(Enum.Graphics.Low, Enum.Graphics.Normal) -> Unique Number (13072 13073)

Note: Although this module is just a small feature that anyone can create on their own, I just wanted to contribute to the forum and share what I’ve made for others to try out. There’s no need to read or pay attention if it’s not something you’re interested in.

Resource Link Enum

6 Likes

i’d love to get my hands on those custom enums, but the model is private

1 Like

i updated link try to click it again

2 Likes