Issues with gameObject Spawner

I will attach a link to the video of what I am looking for and what I have and all my code, but well I will let the video show not tell haha
Video: - YouTube
Code:
Spawner:

public class Spawner : MonoBehaviour
{
	public GameObject balloon;
	public Vector3 spawnValues;
	public int balloonCount;
	public float spawnWait;
	public float startWait;
	public float waveWait;

	void Start ()
	{
		StartCoroutine (SpawnWaves ());
	}

	IEnumerator SpawnWaves ()
	{
		yield return new WaitForSeconds (startWait);
		while (true)
		{
			for (int i = 0; i < balloonCount; i++)
			{
				Vector3 spawnPosition = new Vector3 (Random.Range (-spawnValues.x, spawnValues.x), spawnValues.y, spawnValues.z);
				Quaternion spawnRotation = Quaternion.identity;
				Instantiate (balloon, spawnPosition, spawnRotation);
				yield return new WaitForSeconds (spawnWait);
			}
			yield return new WaitForSeconds (waveWait);
		}
	}
}

Code to pop the balloons on click:

using UnityEngine;
using System.Collections;

public class Popper : MonoBehaviour {



	void OnMouseDown()
	{
		Destroy (gameObject);
	}
}

Despawner Unpopped Balloons:

using UnityEngine;
using System.Collections;

public class Destroy : MonoBehaviour {
	void OnTriggerEnter ( Collider other) 
	{
		if(other.gameObject.tag == "Destroyer"){
		Destroy (gameObject);
		}
	}

}

Thanks not for any help all is appreciated! :smiley:

hi,
I think it would be easier for you to use an invoke repeating to generate for waves

also I recommend you add “new” before random range.

I would recommend to use a raycast from the mouse and see if it hits a ballon rather than the trigger enter.

In terms of the ballons getting block - do you have the code to move them?
Blocking may be linked to rigibbodies so make sure to remove them from the balloons as you don’t need them here.
hope that helps