Spawning in a specified location

Hi Everyone
I’ve asked this before in a different question but I have updated my code and I am going to use this code in order to handle the spawning only thing is I need some help in how to set up the spawning when I button is pressed.

Could someone please help me with this?

Here is the code I am using.

GUI.BeginGroup (Rect (Screen.width/2-300, Screen.height/2-200, 600, 500));
GUI.Box (Rect (0,0,400,200), "Game lobby");


var pProtected="no";

if(serverPasswordProtected){

	pProtected="yes";

}
GUI.Label (Rect (110,20,150,20), "Password protected: ");
GUI.Label (Rect (250,20,100,100), pProtected);

GUI.Label (Rect (110,40,150,20), "Server title: ");
GUI.Label (Rect (250,40,100,100), serverTitle);

GUI.Label (Rect (110, 60, 150, 20), "GameType Selected: ");
GUI.Label (Rect (250, 60, 100, 100), serverGameTypeSelected);

if (serverGameTypeSelected != "DM")
{
    GUI.Label (Rect (110, 120, 150, 20), "Choose Team: ");
    //chooseTeamInt = GUI.Toolbar ( Rect (250, 120, 100, 20), chooseTeamInt, chooseTeamNames);
    
    PlayerPrefs.SetString("playerTeam","");
   GUI.Button(Rect(200,120,80,20),"Red");
   HostLaunchGame();
   
	PlayerPrefs.SetString("playerTeam", "");
    GUI.Button(Rect(280,120,80,20),"Blue");
   
      
}
GUI.Label (Rect (110,80,150,20), "Players: ");
GUI.Label (Rect (250,80,100,100), currentPlayerCount+"/"+serverMaxPlayers);

GUI.Label (Rect (110,100,150,20), "Current players: ");
GUI.Label (Rect (250,100,100,300), players);

// GUI.Label (Rect (250, 330, 150, 20), “Choose Player”);

/* if(Network.isServer){

	if(GUI.Button (Rect (110,140,100,20), "Start the game")){

		HostLaunchGame();

	}
}else{
	GUI.Label (Rect (110,140,100,40), "Waiting for server..");

}

*/
GUI.EndGroup();

}

}

var lastRegTime : float = -60;

function Update(){

if(Network.isServer && lastRegTime<Time.time-60){

	lastRegTime=Time.time;

	MasterServer.RegisterHost(gameName,hostSetting_title, "No description");

}

}
function HostLaunchGame(){

if(!Network.isServer)

{

	RedSpawnPoints = GameObject.FindGameObjectsWithTag("RedSpawnPoints");

			return;

}

}

  1. Format your code correctly.
  2. What exactly are you trying to do? We need more specific information.
  3. What is going wrong? Your code isn’t really doing anything…

if i understand right all you want to do is spawn at a point when a point is pressed a lot like a check point system, best way or rather simplest is have a checkpoint manager script which is not destroyed and have the checkpoints update the position in the manager, then when u reload the level assign the either the instantiatian to it or what ever