Camera:WorldToScreenPoint example code has a typo

In the WorldToScreenPoint API reference, there is a typo in the example code.
At line 2 of the example code, Local is instead supposed to be local.


Here is the correct code:

local camera = workspace.CurrentCamera
local worldPoint = Vector3.new(0, 10, 0)
local vector, onScreen = camera:WorldToScreenPoint(worldPoint)
 
local screenPoint = Vector2.new(vector.X, vector.Y)
local depth = vector.Z
3 Likes

The typo on local still exists. As well, there is (now?) a missing image that shows an example of WorldToScreenPoint being used in-game.

1 Like

Thank you both for the report, the issues are now fixed

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.