Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there a better way of checking for parts in a region than Region3?

Like Region3s but at angles.

2 comments

0

If you can describe the specific situation in which you want to perform this calculation, we might be able to suggest some alternatives.

0

Something like, say, getting parts which are a certain distance away from a given part. I'm just thinking that there's got to be a better way than iterating over every single part in workspace.

1 answer

✓ Accepted answer

There is no solid API for angular regions. One thing you can do is create an invisible part with the desired size and cframe, then use Part:GetTouchingParts(). This only works if the part is cancollide true, and only returns cancollide true parts. So it has problems. Besides this, you would have to do some hard math yourself.

This discussion is preserved as it was. New answers, comments, and votes are closed.