#how should i go about making custom enums?

1 messages · Page 1 of 1 (latest)

grim galleon
#

right now i've currently just got a modulescript that you can reference strings from, wondering if there is a better way to do this

for example,

    EffectTypes = {
        ClicksAdditive = "ClicksAdditive",
        ClicksPercentage = "ClicksPercentage",
        AutoAdditive = "AutoAdditive",
        AutoPercentage = "AutoPercentage"
    }

(in a modulescript)

hushed apex
#

I know there's a way to declare a table like its a inbuilt enum but I don't know how

#

Try searching it up

hard mauve
#

pretty sure theres no way to declare an enum, the way i do it just make a module with the values

fossil herald
#

Roblox doesn’t have built in custom enum declarations but there are libraries for it, the way I personally do it is either the way you’ve done it or a variation using numbers instead of strings