Which is more expensive?

Which is more expensive on the server,
WorldRoot:GetPartsInPart() or
WorldRoot:Raycast()

I am creating a system and am wondering which would be more efficient for my game.

Raycasts would probably be less expensive, assuming you would use Raycast the same amount that you’d use GetPartsInPart.

Okay, I just did a test. Turns out that raycasting is about 2.3x as fast. (raycasting is the top one)
image
Thanks for your help!

3 Likes

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