I have been trying to figure out how to make a set of boxes always create next to each box, but sometimes when it goes offscreen it can't check for if a box is there or not. So there is a chance that it will go diagonal or completely away from the rest of the group. Can someone help me find the solution?

Project: https://scratch.mit.edu/projects/991962671/