Why won't my AI spawning script work?

It spawns 4 skeletons the first round, and everything works, but then in the second round nothing happens. What is wrong?

#pragma strict
var prefab : Transform;
var gos : GameObject[];
var dead : GameObject[];
var roundText : GUIText;
var round : int = 1;
var maxEnemies : int = 4;
var roundStart : boolean;
var count : GameObject;
var player : GameObject;
var script : boolean;
function Start ()
{
	count.GetComponent(Countdown).enabled = false;
}

function Update () 
{
    gos = GameObject.FindGameObjectsWithTag("Enemy");
	dead = GameObject.FindGameObjectsWithTag("Dead");
	player = GameObject.FindWithTag("Player");
	script = player.GetComponent(PlayerHealth).isDead;
	Round();
	roundText.text = "Round" + round.ToString();
}

function Round()
{
	if(gos.length < maxEnemies && roundStart == false && script == false)
	    {
			roundStart = true;
	    	for (var i : int = 0;i < 4; i++)
	 		{
			    Instantiate (prefab, Vector3(i + 2 + 1048.741, 4, 1596.766), Quaternion.identity);
			}
	    }
	if (dead.length == maxEnemies)
	{	
		round += 1;
		maxEnemies += 2;
		for(var k = 0 ; k < dead.length ; k ++)
		{
			Destroy(dead[k]);	
		}
		count.GetComponent(Countdown).enabled = true;
		roundStart = false;
	}
}

firstly:

roundText.text = "Round" + " " + round;

lol why not just

roundText.text = "Round" + round;

also round is not a string so you must use a ToString() like this:

roundText.text = "Round" + round.ToString();

As for your problem, where are you turning roundStart back on?

Based on your code it looks like you tagged the skeletons gameobject multiple time as"Enemy" then “Dead” which is impossible because unity doesn’t allow you to do that. (Unless you trick it with

[1]) so the length of your gos array never goes under 4 because even when the skeletons are down they don't get destroyed. I assume you have an enemy health script so add something like this to it:

    if(health == 0){
    Destroy(this.gameObject)
    }

Hope it helps.
 


  [1]: http://answers.unity3d.com/questions/21664/is-it-possible-to-have-multiple-tags-or-the-like-o.html