Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

what exactly is enumeration? How come its used so much like keys,coreguis

Asked by 5 years ago

i dont get it what is enumeration and why is it always used in so many places

0
This is a repeat question for questions from many months ago greatneil80 2647 — 5y
0
Enums are the same as quotation marks in some cases. Enum.CameraType.Scriptable or "Scriptable" greatneil80 2647 — 5y

2 answers

Log in to vote
1
Answered by
Aznarog 54
5 years ago
Edited 5 years ago

Enumeration is a data type, just like Boolean (true or false), Integers, CFrames, Numbers, etc. However it is special in that, there are so many values it holds, which can be accessed through Enums -- look here http://wiki.roblox.com/index.php?title=Category:Enums So if you wanna change the font of some text in a gui, you can access that font value through Enum.Font.WHATEVERFONTINTHEWIKI -- http://https://developer.roblox.com/api-reference/enum/Font

so pretty much, just like changing the boolean value of a BoolValue object, you can change the text font value of a TextBox gui or the easing direciton of tween.

It is used everywhere, and in so many places because, well look at the wiki link of ENUMS. There are so many important applications in scripting for it. CoreGuis use it so that people like you can use the functionality of coregui's easily. It's like a thing used to make something complicated and long far easier to use. Look at the wiki more and apply it more and you will understand.

Ad
Log in to vote
0
Answered by
Kap_K 0
5 years ago
Edited 5 years ago

Enumeration or Enum in java is a definition type where you pre-define values to a user-defined namespace. It is useful for the allocating multiple values accessible to a specific space in memory, think of it as a variable with multiple values that can be called remotely.

[UPDATE] My apologies, its been some time since Roblox Lua, Apparently it supports Enum but you won't find Enum in real Lua!

Answer this question