You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en-us/luau/enums.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,28 +24,27 @@ end
24
24
Enum.PartType.Ball
25
25
Enum.PartType.Block
26
26
Enum.PartType.Cylinder
27
+
Enum.PartType.Wedge
28
+
Enum.PartType.CornerWedge
27
29
]]
28
30
```
29
31
30
32
## Data type
31
33
32
34
The `Datatype.EnumItem` is the data type for items in enums. An `Datatype.EnumItem` has three properties:
33
35
34
-
-`Name`- The name of the `Datatype.EnumItem`.
35
-
-`Value`- The numerical index of the `Datatype.EnumItem`.
36
-
-`EnumType`- The parent `Datatype.Enum` of the `Datatype.EnumItem`.
36
+
-`Name`— The name of the `Datatype.EnumItem`.
37
+
-`Value`— The numerical index of the `Datatype.EnumItem`.
38
+
-`EnumType`— The parent `Datatype.Enum` of the `Datatype.EnumItem`.
37
39
38
-
Some properties of objects can only be items of certain enums. For example, the `Shape` property of a `Class.Part` object is an item of the `Enum.PartType`Enum. The following code sample demonstrates how to print the properties of the `Enum.PartType.Cylinder`EnumItem.
40
+
Some properties of objects can only be items of certain enums. For example, the `Class.Part.Shape|Shape` property of a `Class.Part` object is an item of the `Enum.PartType`enum. The following code sample demonstrates how to print the properties of the `Enum.PartType.Cylinder`enum item.
39
41
40
42
```lua
41
-
-- Properties of the EnumItem called Enum.PartType.Cylinder
0 commit comments