Is there a more efficient way of doing this performance wise?

So I need to check if a part exists under another part but I need to do this for loads of parts is there a more performance-friendly way of doing this than shooting hundreds of raycasts to check?

All the parts are not on the same y axis!

1 Like

You could weld another part under the part that you want to check. Then, put a script that loops the function GetTouchingParts in the welded part. Or you could get the y value of the part and compare it to the y values of the other part. I could see the 1st method working.