Skip to content

Commit 5cd7e5e

Browse files
authored
Update Object.yaml
1 parent 3f40175 commit 5cd7e5e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

content/en-us/reference/engine/classes/Object.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ methods:
155155
`Datatype.BrickColor` property:
156156
157157
```lua
158+
local Players = game:GetService("Players")
159+
158160
local function paintFigure(character, color)
159161
-- Iterate over the child objects of the character
160162
for _, child in character:GetChildren() do
@@ -165,7 +167,7 @@ methods:
165167
end
166168
end
167169
end
168-
paintFigure(game:GetSerivce("Players").Player.Character, BrickColor.new("Bright blue"))
170+
paintFigure(Players.Player.Character, BrickColor.new("Bright blue"))
169171
```
170172
171173
Since all classes inherit from `Class.Object`, calling

0 commit comments

Comments
 (0)