I am trying to make a dungeon that automatically generates using corridors and rooms.
My script uses math.random to chose a model then teleports the main part of the model (changes cframe) and the rest of the model automatically welds correctly to the main part.
The main room has 4 heads and the corridors can generate other rooms/ corridors and so on.
In this way I can generate a level of the dungeon using rng but sometimes corridors intersect each other.
Can I use some sort of event to find if some parts are loading in the same spot so I can make an intersection?
If so, then how?
(note that the code doesn’t have any problem and this only randomly generates rarely)
If I teleport a part inside of other one the touch event doesn’t work.