Skip to content

Commit 2d1f23d

Browse files
authored
Apply suggestions from code review
1 parent bde4c37 commit 2d1f23d

File tree

1 file changed

+6
-2
lines changed
  • content/en-us/reference/engine/classes

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,11 @@ events:
391391
player clicks while the created tool is equipped.
392392
393393
```lua
394+
local Players = game:GetService("Players")
395+
394396
local tool = Instance.new("Tool")
395397
tool.RequiresHandle = false
396-
tool.Parent = game:GetSerivce("Players").LocalPlayer.Backpack
398+
tool.Parent = Players.LocalPlayer.Backpack
397399
398400
function onActivation()
399401
print("Tool activated")
@@ -423,9 +425,11 @@ events:
423425
player releases their click while the tool is equipped and activated.
424426
425427
```lua
428+
local Players = game:GetService("Players")
429+
426430
local tool = Instance.new("Tool")
427431
tool.RequiresHandle = false
428-
tool.Parent = game:GetSerivce("Players").LocalPlayer.Backpack
432+
tool.Parent = Players.LocalPlayer.Backpack
429433
430434
function toolDeactivated()
431435
print("Tool deactivated")

0 commit comments

Comments
 (0)