Need help with Raycasting

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: WorldRoot | Documentation - Roblox Creator Hub

It will give you a good idea of utilising RaycastParams an the Raycast method.

FindPartOnRay has been deprecated (WorldRoot | Documentation - Roblox Creator Hub) and you should use the Raycast method of the workspace to conduct the similar functionality in games going forward.

Hope this helps,
-Tom :slight_smile:

1 Like

Thanks for the help and extremely quick response! :grinning:

1 Like