I have a script that spawns parts randomly on a baseplate but sometimes they spawn on top of each other or really close to each other. How would I prevent this from happening?

6 comments

0

Does it include the y axis?

0

no it does not

0

You could check the magnitude between the position of the part you're going to place, and any existing parts. If it is smaller than what you wish it to be, then find a new position and compare again.

0

Wouldn't that cause alot of lag?

0

No idea

0

Mmm magnitude or shooting rays or region3s