Let’s say I create 3 points, A B and C, which are all straight in a line. Each point should not be too near each other. My code checks the last created point when deciding whether the point should be moved in case the points are too near each other. A is created first, and since the last created point is nil, A is just created like normal. B is created, and my script knows that A was last created, so B is repeatedly destroyed and created in a different place on the line until it is either far or just not too near A. Now, C is created. as I said earlier my script checks the last created point only, so while it checks B, A is ignored, so there is a possibility of C being too near A.
I really despise messy code, so I need an efficient way to make everything evaluate to true. My current code gives no errors and no warnings, everything works except for that. If I use a for loop, it just loops, and ignores the last time it looped. I thought of using coroutines, but maybe when 1 coroutine is done, another coroutine messes it up by changing it until THAT condition for that point is true.