I've been trying to fix this for 8 hours now and I have no clue what the problem is ```cs
void Spawn()
{
if (spawned == false)
{
if (templates.totalRooms < templates.maxRooms)
{
if (openingDirection == 0)
{
spawned = true;
}
if (openingDirection == 1)
{
rand = Random.Range(0, templates.bottomRooms.Length);
Instantiate(templates.bottomRooms[rand], transform.position, templates.bottomRooms[rand].transform.rotation);
}
else if (openingDirection == 2)
{
rand = Random.Range(0, templates.topRooms.Length);
Instantiate(templates.topRooms[rand], transform.position, templates.topRooms[rand].transform.rotation);
}
else if (openingDirection == 3)
{
rand = Random.Range(0, templates.leftRooms.Length);
Instantiate(templates.leftRooms[rand], transform.position, templates.leftRooms[rand].transform.rotation);
//Need Left door
}
else if (openingDirection == 4)