Skip to content

Commit bde4c37

Browse files
authored
Apply suggestions from code review
1 parent 42432ea commit bde4c37

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,11 +1417,14 @@ events:
14171417
of the user's mouse relative to a GUI element:
14181418
14191419
```lua
1420+
local Players = game:GetService("Players")
1421+
14201422
local CustomScrollingFrame = script.Parent
14211423
local SubFrame = CustomScrollingFrame:FindFirstChild("SubFrame")
14221424
1423-
local mouse = game:GetSerivce("Players").LocalPlayer:GetMouse()
1424-
function getPosition(X, Y)
1425+
local mouse = Players.LocalPlayer:GetMouse()
1426+
1427+
local function getPosition(X, Y)
14251428
local gui_X = CustomScrollingFrame.AbsolutePosition.X
14261429
local gui_Y = CustomScrollingFrame.AbsolutePosition.Y
14271430

0 commit comments

Comments
 (0)