From 57ba199309b5f2ca2d0c222c3fe3237a0f51fbe2 Mon Sep 17 00:00:00 2001
From: gaymeowing <62822174+gaymeowing@users.noreply.github.com>
Date: Wed, 17 Sep 2025 11:11:15 -0400
Subject: [PATCH 1/7] Inital commit
---
content/en-us/luau/index.md | 1 -
content/en-us/{luau => scripting}/enums.md | 13 +++++++++----
content/en-us/scripting/index.md | 2 +-
3 files changed, 10 insertions(+), 6 deletions(-)
rename content/en-us/{luau => scripting}/enums.md (77%)
diff --git a/content/en-us/luau/index.md b/content/en-us/luau/index.md
index e7524f989..daac8f6fa 100644
--- a/content/en-us/luau/index.md
+++ b/content/en-us/luau/index.md
@@ -22,7 +22,6 @@ Luau includes the following data types:
- [Numbers](numbers.md), or `double`, represent double-precision (64-bit) floating-point numbers.
- [Strings](strings.md) are sequences of characters, such as letters, numbers, and symbols.
- [Tables](tables.md) are [arrays](tables.md#arrays) or [dictionaries](tables.md#dictionaries) of any value except `nil`.
-- [Enums](enums.md) are fixed lists of items.
Luau is dynamically typed by default. Variables, function parameters, and return values can be any data type. This helps you write code faster because you don't need to provide types for each piece of data. You can still declare explicit types for variables in Luau and enable [strict type checking](type-checking.md) to make type issues obvious and easy to locate.
diff --git a/content/en-us/luau/enums.md b/content/en-us/scripting/enums.md
similarity index 77%
rename from content/en-us/luau/enums.md
rename to content/en-us/scripting/enums.md
index 5461d179f..2f609074e 100644
--- a/content/en-us/luau/enums.md
+++ b/content/en-us/scripting/enums.md
@@ -11,6 +11,7 @@ To get all items of an Enum, call the `GetEnumItems()` method on the enum. The f
```lua
local partTypes = Enum.PartType:GetEnumItems()
+
for index, enumItem in partTypes do
print(enumItem)
end
@@ -34,15 +35,20 @@ Some properties of objects can only be items of certain enums. For example, the
```lua
-- Properties of the EnumItem called Enum.PartType.Cylinder
-print(Enum.PartType.Cylinder.Name) -- Cylinder
-print(Enum.PartType.Cylinder.Value) -- 2
-print(Enum.PartType.Cylinder.EnumType) -- PartType
+print(Enum.PartType.Cylinder.Name) --> "Cylinder"
+print(Enum.PartType.Cylinder.Value) --> 2
+print(Enum.PartType.Cylinder.EnumType) --> PartType
```
## Assign enum items
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`.
+
+Assigning `Datatype.EnumItem` properties like `Class.Part.Shape|Shape` to the `DataType.EnumItem.Value|Value` property is bad practice, as the `DataType.EnumItem.Value|Value` property can be moved around if a new `Datatype.EnumItem` is added to the `Enum.PartType` enum.
+Meaning your code may break if you rely on assigning `Datatype.EnumItem` via their `DataType.EnumItem.Value|Value`.
+
+
```lua
local Workspace = game:GetService("Workspace")
@@ -52,6 +58,5 @@ part.Shape = Enum.PartType.Cylinder.Value -- By EnumItem Value
part.Shape = 2 -- By EnumItem Value
part.Shape = Enum.PartType.Cylinder.Name -- By EnumItem Name
part.Shape = "Cylinder" -- By EnumItem Name
-
part.Parent = Workspace
```
diff --git a/content/en-us/scripting/index.md b/content/en-us/scripting/index.md
index 4c8564d27..5665da0e9 100644
--- a/content/en-us/scripting/index.md
+++ b/content/en-us/scripting/index.md
@@ -13,7 +13,7 @@ If you've never written code before and want an introduction to programming, see
## Luau
-Roblox scripts use the [Luau](https://luau-lang.org) programming language, which is derived from [Lua 5.1](https://www.lua.org/manual/5.1/).
+Roblox scripts use the [Luau](https://luau.org) programming language, which is derived from [Lua 5.1](https://www.lua.org/manual/5.1/).
- Compared to Lua 5.1, Luau adds performance enhancements and many useful features, including an optional typing system, string interpolation, and generalized iteration for tables.
- All valid Lua 5.1 code is valid Luau code, but the opposite is not true.
From f63807db2442b70bcf320bc8f900d1a875deaf87 Mon Sep 17 00:00:00 2001
From: gaymeowing <62822174+gaymeowing@users.noreply.github.com>
Date: Mon, 29 Sep 2025 18:20:33 -0400
Subject: [PATCH 2/7] * move enums back to luau docs * add info notice to enums
docs stating they arent a built in luau type * fix another luau site url in
the scriping section
---
content/en-us/{scripting => luau}/enums.md | 4 ++++
content/en-us/luau/index.md | 1 +
content/en-us/scripting/index.md | 2 +-
3 files changed, 6 insertions(+), 1 deletion(-)
rename content/en-us/{scripting => luau}/enums.md (89%)
diff --git a/content/en-us/scripting/enums.md b/content/en-us/luau/enums.md
similarity index 89%
rename from content/en-us/scripting/enums.md
rename to content/en-us/luau/enums.md
index 2f609074e..c2a8fc36d 100644
--- a/content/en-us/scripting/enums.md
+++ b/content/en-us/luau/enums.md
@@ -3,6 +3,10 @@ title: Enums
description: A fixed list of items (enumeration).
---
+
+Enums are not a [builtin luau type](https://luau.org/typecheck#builtin-types), and exist only in Roblox. This page is located here because Eunms are conceptually similar enough, and are something you will work with all the time in Roblox development.
+
+
The **enumeration** data type, or `Datatype.Enum`, is a fixed list of items. You can access enums through the global object called `Datatype.Enum`. For a full list of Enums and their items, see [Enums](/reference/engine/enums) in the API Reference.
## Get enum items
diff --git a/content/en-us/luau/index.md b/content/en-us/luau/index.md
index daac8f6fa..e7524f989 100644
--- a/content/en-us/luau/index.md
+++ b/content/en-us/luau/index.md
@@ -22,6 +22,7 @@ Luau includes the following data types:
- [Numbers](numbers.md), or `double`, represent double-precision (64-bit) floating-point numbers.
- [Strings](strings.md) are sequences of characters, such as letters, numbers, and symbols.
- [Tables](tables.md) are [arrays](tables.md#arrays) or [dictionaries](tables.md#dictionaries) of any value except `nil`.
+- [Enums](enums.md) are fixed lists of items.
Luau is dynamically typed by default. Variables, function parameters, and return values can be any data type. This helps you write code faster because you don't need to provide types for each piece of data. You can still declare explicit types for variables in Luau and enable [strict type checking](type-checking.md) to make type issues obvious and easy to locate.
diff --git a/content/en-us/scripting/index.md b/content/en-us/scripting/index.md
index 5665da0e9..e0e7902e2 100644
--- a/content/en-us/scripting/index.md
+++ b/content/en-us/scripting/index.md
@@ -18,7 +18,7 @@ Roblox scripts use the [Luau](https://luau.org) programming language, which is d
- Compared to Lua 5.1, Luau adds performance enhancements and many useful features, including an optional typing system, string interpolation, and generalized iteration for tables.
- All valid Lua 5.1 code is valid Luau code, but the opposite is not true.
-Most books and online resources for Lua are still broadly applicable to Luau. For a detailed summary of differences, see [Compatibility](https://luau-lang.org/compatibility) in the Luau documentation. For language syntax, see the [Luau reference](../luau/index.md).
+Most books and online resources for Lua are still broadly applicable to Luau. For a detailed summary of differences, see [Compatibility](https://luau.org/compatibility) in the Luau documentation. For language syntax, see the [Luau reference](../luau/index.md).
### Luau basics
From 0341c362458860674161aff72e52e04ad4762883 Mon Sep 17 00:00:00 2001
From: IgnisRBX <43388550+IgnisRBX@users.noreply.github.com>
Date: Tue, 30 Sep 2025 09:13:18 -0700
Subject: [PATCH 3/7] Apply suggestions from code review
---
content/en-us/luau/enums.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/content/en-us/luau/enums.md b/content/en-us/luau/enums.md
index c2a8fc36d..326b145d5 100644
--- a/content/en-us/luau/enums.md
+++ b/content/en-us/luau/enums.md
@@ -4,12 +4,12 @@ description: A fixed list of items (enumeration).
---
-Enums are not a [builtin luau type](https://luau.org/typecheck#builtin-types), and exist only in Roblox. This page is located here because Eunms are conceptually similar enough, and are something you will work with all the time in Roblox development.
+Enums are not a [built-in Luau type](https://luau.org/typecheck#builtin-types) and they exist only in Roblox, but they're conceptually similar to other Luau data types and are something you'll work with frequently in Roblox development.
-The **enumeration** data type, or `Datatype.Enum`, is a fixed list of items. You can access enums through the global object called `Datatype.Enum`. For a full list of Enums and their items, see [Enums](/reference/engine/enums) in the API Reference.
+The **enumeration** data type, or `Datatype.Enum`, is a fixed list of items. You can access enums through the global object called `Datatype.Enum`. For a full list and their respective items, see [Enums](/reference/engine/enums).
-## Get enum items
+## Enum items
To get all items of an Enum, call the `GetEnumItems()` method on the enum. The following code sample demonstrates how to call `GetEnumItems()` on the `Enum.PartType` enum.
From d60429cbbc9a73510f88c49cb3acfdc322a34968 Mon Sep 17 00:00:00 2001
From: IgnisRBX <43388550+IgnisRBX@users.noreply.github.com>
Date: Tue, 30 Sep 2025 09:18:04 -0700
Subject: [PATCH 4/7] Apply suggestions from code review
---
content/en-us/luau/enums.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/en-us/luau/enums.md b/content/en-us/luau/enums.md
index 326b145d5..db430c0d9 100644
--- a/content/en-us/luau/enums.md
+++ b/content/en-us/luau/enums.md
@@ -11,7 +11,7 @@ The **enumeration** data type, or `Datatype.Enum`, is a fixed list of items. You
## Enum items
-To get all items of an Enum, call the `GetEnumItems()` method on the enum. The following code sample demonstrates how to call `GetEnumItems()` on the `Enum.PartType` enum.
+To get all items of an enum, call the `Datatype.Enum:GetEnumItems()|GetEnumItems()` method on it. The following code sample demonstrates how to call `Datatype.Enum:GetEnumItems()|GetEnumItems()` on the `Enum.PartType` enum.
```lua
local partTypes = Enum.PartType:GetEnumItems()
From 0f1cd61a72219648e4bc8c5e99f0fe9d42fea5ef Mon Sep 17 00:00:00 2001
From: IgnisRBX <43388550+IgnisRBX@users.noreply.github.com>
Date: Tue, 30 Sep 2025 09:25:27 -0700
Subject: [PATCH 5/7] Update enums.md
---
content/en-us/luau/enums.md | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/content/en-us/luau/enums.md b/content/en-us/luau/enums.md
index db430c0d9..b6dd27405 100644
--- a/content/en-us/luau/enums.md
+++ b/content/en-us/luau/enums.md
@@ -24,6 +24,8 @@ end
Enum.PartType.Ball
Enum.PartType.Block
Enum.PartType.Cylinder
+ Enum.PartType.Wedge
+ Enum.PartType.CornerWedge
]]
```
@@ -31,21 +33,18 @@ end
The `Datatype.EnumItem` is the data type for items in enums. An `Datatype.EnumItem` has three properties:
-- `Name` - The name of the `Datatype.EnumItem`.
-- `Value` - The numerical index of the `Datatype.EnumItem`.
-- `EnumType` - The parent `Datatype.Enum` of the `Datatype.EnumItem`.
+- `Name` — The name of the `Datatype.EnumItem`.
+- `Value` — The numerical index of the `Datatype.EnumItem`.
+- `EnumType` — The parent `Datatype.Enum` of the `Datatype.EnumItem`.
-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.
+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.
```lua
--- Properties of the EnumItem called Enum.PartType.Cylinder
print(Enum.PartType.Cylinder.Name) --> "Cylinder"
print(Enum.PartType.Cylinder.Value) --> 2
print(Enum.PartType.Cylinder.EnumType) --> PartType
```
-## Assign enum items
-
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`.
From b9a82551cda851e6845111ca3010418c281772c2 Mon Sep 17 00:00:00 2001
From: quaywinn <62822174+gaymeowing@users.noreply.github.com>
Date: Tue, 30 Sep 2025 14:12:00 -0400
Subject: [PATCH 6/7] Remove extra whitespace and remove reference to being
able to assign Enum properties to an EnumItem's value
---
content/en-us/luau/enums.md | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/content/en-us/luau/enums.md b/content/en-us/luau/enums.md
index b6dd27405..440946ee2 100644
--- a/content/en-us/luau/enums.md
+++ b/content/en-us/luau/enums.md
@@ -45,20 +45,13 @@ print(Enum.PartType.Cylinder.Value) --> 2
print(Enum.PartType.Cylinder.EnumType) --> PartType
```
-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`.
-
-
-Assigning `Datatype.EnumItem` properties like `Class.Part.Shape|Shape` to the `DataType.EnumItem.Value|Value` property is bad practice, as the `DataType.EnumItem.Value|Value` property can be moved around if a new `Datatype.EnumItem` is added to the `Enum.PartType` enum.
-Meaning your code may break if you rely on assigning `Datatype.EnumItem` via their `DataType.EnumItem.Value|Value`.
-
+To assign an `Datatype.EnumItem` as the value of a property, use the full `Datatype.Enum` declaration. You can also use its `Datatype.EnumItem.Name|Name`.
```lua
local Workspace = game:GetService("Workspace")
-local part = Instance.new("Part") -- Create a new part
+local part = Instance.new("Part") -- Create a new part
part.Shape = Enum.PartType.Cylinder -- By EnumItem (best practice)
-part.Shape = Enum.PartType.Cylinder.Value -- By EnumItem Value
-part.Shape = 2 -- By EnumItem Value
part.Shape = Enum.PartType.Cylinder.Name -- By EnumItem Name
part.Shape = "Cylinder" -- By EnumItem Name
part.Parent = Workspace
From 5c6db958e9dc4a2aa6306f941886f6a44aeb540e Mon Sep 17 00:00:00 2001
From: IgnisRBX <43388550+IgnisRBX@users.noreply.github.com>
Date: Tue, 30 Sep 2025 12:06:08 -0700
Subject: [PATCH 7/7] Update enums.md
---
content/en-us/luau/enums.md | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/content/en-us/luau/enums.md b/content/en-us/luau/enums.md
index 440946ee2..58fb1feee 100644
--- a/content/en-us/luau/enums.md
+++ b/content/en-us/luau/enums.md
@@ -45,14 +45,15 @@ print(Enum.PartType.Cylinder.Value) --> 2
print(Enum.PartType.Cylinder.EnumType) --> PartType
```
-To assign an `Datatype.EnumItem` as the value of a property, use the full `Datatype.Enum` declaration. You can also use its `Datatype.EnumItem.Name|Name`.
+To assign an `Datatype.EnumItem` as the value of a property, use the full `Datatype.Enum` declaration. You can also use the item's `Datatype.EnumItem.Name|Name` property as a string.
```lua
local Workspace = game:GetService("Workspace")
local part = Instance.new("Part") -- Create a new part
-part.Shape = Enum.PartType.Cylinder -- By EnumItem (best practice)
-part.Shape = Enum.PartType.Cylinder.Name -- By EnumItem Name
-part.Shape = "Cylinder" -- By EnumItem Name
+
+part.Shape = Enum.PartType.Cylinder -- By full enum item declaration (best practice)
+part.Shape = "Cylinder" -- By enum item's name as a string
+
part.Parent = Workspace
```