diff --git a/content/en-us/chat/bubble-chat.md b/content/en-us/chat/bubble-chat.md index 523c1237b..eb3e80b38 100644 --- a/content/en-us/chat/bubble-chat.md +++ b/content/en-us/chat/bubble-chat.md @@ -424,9 +424,9 @@ TextChatService.OnBubbleAdded = function(message: TextChatMessage, adornee: Inst -- Add a UIGradient as a child to customize the gradient local uiGradient : UIGradient = Instance.new("UIGradient") uiGradient.Color = ColorSequence.new(Color3.fromRGB(110, 4, 0), Color3.fromRGB(0, 0, 0)) - uiGradient.Parent = bubbleProperties uiGradient.Rotation = 90 - + uiGradient.Parent = bubbleProperties + return bubbleProperties end end diff --git a/content/en-us/education/build-it-play-it-mansion-of-wonder/adding-scripts.md b/content/en-us/education/build-it-play-it-mansion-of-wonder/adding-scripts.md index e75ea4493..ac396b32d 100644 --- a/content/en-us/education/build-it-play-it-mansion-of-wonder/adding-scripts.md +++ b/content/en-us/education/build-it-play-it-mansion-of-wonder/adding-scripts.md @@ -239,8 +239,8 @@ The three scripts below will look for the particle emitter and beam objects crea playerBeam = beamTemplate:Clone() playerBeam.Attachment0 = playerBeamAttachment playerBeam.Attachment1 = targetBeamAttachment - playerBeam.Parent = humanoidRootPart playerBeam.Enabled = true + playerBeam.Parent = humanoidRootPart end local function setupPlayer() diff --git a/content/en-us/luau/enums.md b/content/en-us/luau/enums.md index 5a05a4dc5..24a40801b 100644 --- a/content/en-us/luau/enums.md +++ b/content/en-us/luau/enums.md @@ -45,11 +45,11 @@ To assign an `Datatype.EnumItem` as the value of a property, use the full `Datat ```lua local part = Instance.new("Part") -- Create a new part -part.Parent = workspace - 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 ``` diff --git a/content/en-us/luau/type-coercion.md b/content/en-us/luau/type-coercion.md index b886fa4c0..00a4fe33a 100644 --- a/content/en-us/luau/type-coercion.md +++ b/content/en-us/luau/type-coercion.md @@ -39,19 +39,19 @@ Luau coerces numbers and strings of enum values into the full enum name. For exa ```lua local part1 = Instance.new("Part") -part1.Parent = workspace part1.Material = 816 +part1.Parent = workspace print(part1.Material) -- Enum.Material.Concrete local part2 = Instance.new("Part") -part2.Parent = workspace part2.Material = "Concrete" +part2.Parent = workspace print(part2.Material) -- Enum.Material.Concrete -- This is best practice because it's the most explicit local part3 = Instance.new("Part") -part3.Parent = workspace part3.Material = Enum.Material.Concrete +part3.Parent = workspace print(part3.Material) -- Enum.Material.Concrete ``` diff --git a/content/en-us/performance-optimization/identifying.md b/content/en-us/performance-optimization/identifying.md index e2f1fce6e..1578ac7c5 100644 --- a/content/en-us/performance-optimization/identifying.md +++ b/content/en-us/performance-optimization/identifying.md @@ -131,7 +131,7 @@ game.Loaded:Connect(function() local loadTime = os.clock() - startTime local roundedLoadTime = math.round(loadTime * 10000) / 10000 -- four decimal places print("Game loaded in " .. roundedLoadTime .. " seconds.") - print("Number of instances loaded: " .. #game.Workspace:GetDescendants()) + print("Number of instances loaded: " .. #workspace:GetDescendants()) end) ``` diff --git a/content/en-us/reference/engine/classes/Instance.yaml b/content/en-us/reference/engine/classes/Instance.yaml index 5b628ec7c..57fda7d7e 100644 --- a/content/en-us/reference/engine/classes/Instance.yaml +++ b/content/en-us/reference/engine/classes/Instance.yaml @@ -178,7 +178,7 @@ properties: -- Create a part and parent it to the workspace local part = Instance.new("Part") part.Parent = workspace - -- Instance new can also take Parent as a second parameter + -- Instance new can also take Parent as a second parameter, though it is not recommended Instance.new("NumberValue", workspace) ``` diff --git a/content/en-us/reference/engine/classes/WeldConstraint.yaml b/content/en-us/reference/engine/classes/WeldConstraint.yaml index 8ee34b7f6..d41826ee7 100644 --- a/content/en-us/reference/engine/classes/WeldConstraint.yaml +++ b/content/en-us/reference/engine/classes/WeldConstraint.yaml @@ -138,9 +138,9 @@ properties: partB.Parent = workspace local weld = Instance.new("WeldConstraint") - weld.Parent = partA weld.Part0 = partA weld.Part1 = partB + weld.Parent = partA ``` code_samples: type: BasePart @@ -175,15 +175,15 @@ properties: local partB = Instance.new("Part") partA.Position = Vector3.new(0, 10, 0) - partA.Parent = game.Workspace + partA.Parent = workspace partB.Position = Vector3.new(0, 10, 10) - partB.Parent = game.Workspace + partB.Parent = workspace local weld = Instance.new("WeldConstraint") - weld.Parent = partA weld.Part0 = partA weld.Part1 = partB + weld.Parent = partA ``` code_samples: type: BasePart diff --git a/content/en-us/ui/frames.md b/content/en-us/ui/frames.md index 425c49b56..5381cef3e 100644 --- a/content/en-us/ui/frames.md +++ b/content/en-us/ui/frames.md @@ -119,8 +119,8 @@ If you want a 3D object such as a `Class.BasePart` to rotate on its own within t -- Viewport camera initialization local viewportCamera = Instance.new("Camera") viewportCamera.FieldOfView = cameraFieldOfView - viewportCamera.Parent = viewportFrame viewportFrame.CurrentCamera = viewportCamera + viewportCamera.Parent = viewportFrame -- Viewport object initialization local object = viewportFrame:FindFirstChildWhichIsA("BasePart")