What is Enum, and what does it stand for?

I’m trying to learn scripting, and while learning services like UserInputService or TweenService, I learned that their was this one thing cald “Enum” that you would usually used. What does it stand for and what is its purpose?

4 Likes

An enumeration, shortened to Enum, is a special data type that can take on specific sets of values. Confusing? Lets use examples.

One use of Enums is getting materials. You could do something like this:

part.Material = "Smooth Plastic"

But there are a few issues with this, and it could be deprecated/ break so it’s best not to. However, with enums, you can do it like so:

part.Material = Enum.Material.SmoothPlastic
25 Likes