delete object on start c#

Hi everybody
I’m trying to add a gamemode to my game, survival
in survival there is a triger box to spawn AI (working)
now, I wan’t to delete the triger box when the gamemode is not survival
so far i have this:

public GameObject AIspawn;

…//more codes

	void Awake () {


gameNumber = (string)PhotonNetwork.room.customProperties["gameNumber"];

if(gameNumber == "THREE"){

//not this so I leave it blank

}else
{

DestroyImmediate(AIspawn,true);

}

//more codes

This is not working, the AI triger box never exists (but it works if i don’t have this code, unfortunaly, in all gamemodes)

Anybody know what I should do?

Assuming you are attaching this script to the object where you spawn AI, Just use Destroy(this.gameObject); or if you just want to remove that script use Destroy(this);