I’ve recently been trying to understand Raycasting better because I don’t understand it so well. I’ve been learning to use FindPartOnRay but when I look on the DevForum, I see that they use RaycastParams(), which is something I haven’t seen.
In addition to this, I’ve only previously seen Ray.new() used, but only workspace:Raycast() on the DevForum.
Has Ray.new() or FindPartOnRay been depreciated? I haven’t seen these functions on the forum. I only saw these functions in older YouTube videos.
You should check out this article: https://developer.roblox.com/en-us/api-reference/function/WorldRoot/Raycast
It will give you a good idea of utilising RaycastParams an the Raycast method.
FindPartOnRay has been deprecated (https://developer.roblox.com/en-us/api-reference/function/WorldRoot/FindPartOnRay) and you should use the Raycast method of the workspace to conduct the similar functionality in games going forward.
Hope this helps,
-Tom
1 Like
Thanks for the help and extremely quick response!
1 Like