Camera:WorldToViewportPoint code sample uses now-deprecated raycasting API

Title says it all, the documentation for Camera:WorldToViewportPoint uses the old raycasting API, so it should be updated to use the new one.

It also uses the deprecated p property of CFrame so it should just use Position now.

And, while pedantic, I believe that camera should be defined outside of the function body since it is a constant

2 Likes