Problem with [SyncVar] which does not synchronise

Hello.
I have a problem I am sick about it. I had no answer on my previous question, so I will ask more concise :

What I want is that when my player is dead, his score has to be writen and stay on a SyncVar. I simplify the code for better understanding. the script is put on my spawned player, with a network identity “local authority” :

[SyncVar] public float scorePlayer1 = 0.0f;
[SyncVar] public float scorePlayer2 = 0.0f;

public static uint id;

public bool dead = false;
public bool commandDone = true;

void Start()

{
id = GetComponent<NetworkIdentity> ().netId.Value; 
}

void update()
{
	  if (!dead && islocalplayer)
        {
           //game
	}

	else {
		if (commandDone)
		{
		  CmdClassify(id);

		  commandDone = false;
		}
	   }

Debug.Log (scorePlayer1);
Debug.Log (scorePlayer2);

}


[Command]
void CmdClassify(float id)
{
	if (id == 1.0){  scorePlayer1 = 1;  }
	if (id == 2.0){  scorePlayer2 = 2;  }
}

The result of the Debug Log is :

—> When player 1 (me) is dead :
1
0

—> When player 2 is dead (after player one is dead) :
0
2

So, like you can see, the [SyncVar] are not really synchronised. When the two players are dead, the debug log should be :

1
2

I don’t understand. If someone can explain me what happened, it would be really great :slight_smile:
Please, don’t copy/paste me some link for a video tutorial like “whatch this” with nothnig else. I know I am a beginner, but I have already watch a lot about SyncVar and I need to understand why precisely my code is not working. And that type of answer are really not pleasant :frowning:

Thanks

No it all works fine : the game starts ok. What I wrote is not the original code, I just write quickly the part which is doesn’t working like I want it to do, as I didn’t want you to be lost :slight_smile: (so yes I made a mistake on writing Update here but not in my original code) I would have copy past you the real code but 731 lines… too much ^^