I have a problem with my game manager.

Everytime the players dies in the game the game manager stops working after the scene is reset.
Try playing the game and you’ll understand my problem 2D ZOMBIE ANNIHILATION by AntGames.

here is a part of the game manager script:

void update() {
if (zombieCounter == 0 && !isSpawning) 
		{
			timer -= Time.deltaTime;
			if(timer <= 0)
			{
				UpdateWave ();
				defaultSpawnNum = (int)(defaultSpawnNum * 1.5);
				moneyPack.maxMoneyValue = (int)(moneyPack.maxMoneyValue * 1.5);
			}
                }
}

public IEnumerator SpawnZombies (int wave)
	{
		int spawnNum = (defaultSpawnNum + 5 * (wave - 1));
		isSpawning = true;
		for (int i = 0; i < spawnNum; i++) {
			yield return new WaitForSeconds (spawnDelay);
			int spawnPointsIndex = Random.Range (0, spawnPoints.Length);
			int zombiesIndex = Random.Range (0, zombies.Length);
			Instantiate (zombies [zombiesIndex], spawnPoints [spawnPointsIndex].position, spawnPoints [spawnPointsIndex].rotation);
			/*if(waveNum % 10 == 0)
			{
				Instantiate (bossZombie, spawnPoints [spawnPointsIndex].position, spawnPoints [spawnPointsIndex].rotation);
                waveNum += 1;
			}
            if(waveNum % 5 == 0)
            {
                Instantiate(zombies[2], spawnPoints[spawnPointsIndex].position, spawnPoints[spawnPointsIndex].rotation);
            }*/
			zombieCounter++;
		}
		isSpawning = false;
	}
	
	public void UpdateWave ()
	{
		timer = 60f;
		waveNum++;
		StartCoroutine (SpawnZombies (waveNum));
	}

My guess would be a bad coroutine. I don’t think you need one here and I also don’t see any yields in the coroutine itself.