Skip to content

Commit 0f1cd61

Browse files
authored
Update enums.md
1 parent d60429c commit 0f1cd61

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

content/en-us/luau/enums.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,27 @@ end
2424
Enum.PartType.Ball
2525
Enum.PartType.Block
2626
Enum.PartType.Cylinder
27+
Enum.PartType.Wedge
28+
Enum.PartType.CornerWedge
2729
]]
2830
```
2931

3032
## Data type
3133

3234
The `Datatype.EnumItem` is the data type for items in enums. An `Datatype.EnumItem` has three properties:
3335

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`.
3739

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.
3941

4042
```lua
41-
-- Properties of the EnumItem called Enum.PartType.Cylinder
4243
print(Enum.PartType.Cylinder.Name) --> "Cylinder"
4344
print(Enum.PartType.Cylinder.Value) --> 2
4445
print(Enum.PartType.Cylinder.EnumType) --> PartType
4546
```
4647

47-
## Assign enum items
48-
4948
To assign an `Datatype.EnumItem` as the value of a property, use the full `Datatype.Enum` declaration. You can also use its `Value` or `EnumType`.
5049

5150
<Alert severity="warning">

0 commit comments

Comments
 (0)