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?
COMMUNITY QUESTION
How would i prevent parts from spawning too close to each other? [Closed]
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
Does it include the y axis?
no it does not
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.
Wouldn't that cause alot of lag?
No idea
Mmm magnitude or shooting rays or region3s