Trying to get parts from a Non-Cubical Area

Hello there, hope you’re doing great

So, as the title says, i want to get all the parts that are on a certain area (basically all the parts above a platform), and i was working with Region3() so it returns the parts, but now, the issue that i realized right now is that Region3() can only make cubical areas (as i know lol), so let me explain what do i want to do.

Let’s say that we have multiple platforms together, like this:

And we want to get all the parts that are above the platforms, so the area should be like this:

so i was thinking to make a Region3() per platform, but that wouldn’t work well since parts could overlap between 2 regions, and that would end getting 2 copies of a part;

Knowing all of this, is there a way to make an area (like the one in the example) with, or without Region3()?

All replies are welcome! (and sorry if i have bad grammar or something, i’m not english lol)

You should use multiple regions but avoid using Region3 as it is deprecated.

What could i use if it Region3 is deprecated? i’m kinda new to this so i don’t know if there is any better alternative :confused:

how about you union them then use BasePart:GetTouchingParts?

1 Like

I heard that method had performance issues.

Some functions in Workspace from the documentation have some relevant results that can help with this.

1 Like

Touched and TouchEnded is what i have left for this.

I would use ZonePlus if I were you. I’m not sure how it really works though.

it could work, but the game that i’m developing adds platforms, so i can’t really use just one union, idk if there is a way to make unions via scripts

yea u can, check out this post How do I create unions with a script?

1 Like

Have you checked out ZonePlus?

1 Like