Distance between randomly spawned objects

I don’t really know how… That if statement in my code spawns them randomly, sometimes I’m lucky and they spawn at good distance between each other, but sometimes, since it’s completely random, they spawn even 3 or 4 near each other.