Network.Instantiate works on client only

Using Network.Instantiate called from OnConnectedToServer(). I have a NetworkView attached to the prefab. Prefab and spawnpoint dragged to public vars via inspector. Client connects to server but spawns prefab on itself only. This seems so simple but I just can’t make it work. I have read every single topic on this over and over and most get it to work on the server but not on the client. I even seem to be using the exact same code. 2 days of this is driving me nuts please help.

var playerPrefab:GameObject;
var spawnObject:Transform;


function OnConnectedToServer(){
	Debug.Log("Connected");
	yield WaitForSeconds(1);
	spawnPlayer();
}

function spawnPlayer(){
	Debug.Log("Spawning player ... please wait");
	Network.Instantiate(playerPrefab,spawnObject.position,Quaternion.identity,0);
	Debug.Log("Player spawned ... play game");
}

OnConnectedToServer() is indeed only being called on the client. You have to use OnPlayerConnected() to take action on the server once a client connected to it.

Add another SpawnPlayer() in


void OnServerInitialized()//For server
{
   SpawnPlayer();
}
void OnConnectedToServer()//For clients
{
   SpawnPlayer();
}