Help Needed for a Procedurally Generated Room System

You might wanna add a condition where if the next room overlaps with a previous room, This should be done with some grid-like room placement. In the image, the grid cannot be described so I would suggest making every room the maximum size of atleast 50 studs. If you don’t want that then you can do that on your own way. You can also make use of raycast to determine what room should be generated to avoid the overlapping issue.