Third Person Network Tutorial Question

So I noticed on the third person network tutorial if you connect to a server (testing both on my local network) theres only one camera for both players. But they both see themself. How does that work?

The camera’s target isn’t set at the start of the scene. When you join or start a game, you instantiate your network player prefab, and a script on the prefab sends a message to the camera to set the target to your prefab in OnNetworkInstantiate(). The camera is not network aware, and the setting of the target is not a network message, so it could be targeting you in your game and another player in his game.

Thanks Prime! Its not working that well… I have this on the player. It works for the first player but the second player it doenst.

function OnNetworkInstantiate (info : NetworkMessageInfo) {
    var script : CameraFollow;
script = Camera.main.GetComponent("CameraFollow");
script.target = transform;

}

and this on the camera (just to test)

var target : Transform;
function Start () {

}

function Update () {
if(target){
transform.position = target.position;
transform.rotation= target.rotation;
}
}

Never mind, got it all working!