File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
content/en-us/reference/engine/classes Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1224,7 +1224,10 @@ methods:
12241224 the screen, for example:
12251225
12261226 ```lua
1227- local camera = workspace.CurrentCamera
1227+ local Workspace = game:GetService("Workspace")
1228+
1229+ local camera = Workspace.CurrentCamera
1230+
12281231 local viewportPoint = camera.ViewportSize / 2
12291232 local unitRay = camera:ViewportPointToRay(viewportPoint.X, viewportPoint.Y, 0)
12301233 ```
@@ -1233,7 +1236,10 @@ methods:
12331236 create a longer ray, you can do the following:
12341237
12351238 ```lua
1236- local camera = workspace.CurrentCamera
1239+ local Workspace = game:GetService("Workspace")
1240+
1241+ local camera = Workspace.CurrentCamera
1242+
12371243 local length = 500
12381244 local unitRay = camera:ScreenPointToRay(100, 100)
12391245 local extendedRay = Ray.new(unitRay.Origin, unitRay.Direction * length)
You can’t perform that action at this time.
0 commit comments