title: Unity Networking: Flipping sprites in Multiplayer doesn't flip host
body: <p>I'm working on a small multiplayer 2d platformer game. I've managed to get it to replicate animations, movement and flipping sprites across network, but I have a bug I can't get my head around. The code for flipping sprites works perfectly for the host - he can see other players switch sides when turning left or right, but everyone else cannot see the host flip. Also the third player cannot see the second player turn etc. Something is not right and it would be great if someone could take a look at my code.</p>
  
  <p>Code in main <strong>Player</strong> script:</p>
  
  <pre><code>if (input.x &gt; 0 &amp;&amp; !facingRight)
       {
           FlipSprite();
           GetComponent&lt;Player_SyncPosition&gt;().FlipSprite();
       }
       else if (input.x &lt; 0 &amp;&amp; facingRight)
       {
           FlipSprite();
           GetComponent&lt;Player_SyncPosition&gt;().FlipSprite();
       }
  </code></pre>
  
  <p>Code in an additional <strong>Player_SyncPosition</strong> script on the player:</p>
  
  <pre><code> [ClientCallback]
   public void FlipSprite()
   {  
       if (isLocalPlayer)
       {
           CmdFlip();
       }
   }
   [Command]
   void CmdFlip()
   {
       if (!isLocalPlayer)
       {
           print("Switching sides");
           facingRight = !facingRight;
           Vector3 SpriteScale = GetComponent&lt;Transform&gt;().localScale;
           SpriteScale.x *= -1;
           GetComponent&lt;Transform&gt;().localScale = SpriteScale;
       }
   }
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <p><strong>Player</strong></p>
  
  <pre><code>Player_SyncPosition pSync;
  void Awake()
  {
      pSync = GetComponent&lt;Player_SyncPosition&gt;();
  }
  
  void Update () 
  {
  if ((input.x &gt; 0 &amp;&amp; !pSync.facingRight) || (input.x &lt; 0 &amp;&amp; pSync.facingRight))
      {
          pSync.FlipSprite();
      }
  }
  </code></pre>
  
  <p><strong>Player_SyncPosition</strong></p>
  
  <pre><code>[SyncVar(hook = "FaceDirCallback")]
  public bool facingRight = true;
  
  [ClientCallback]
  public void FlipSprite()
  {
      if (isLocalPlayer)
      {
          CmdFlip();
      }
  }
  [Command]
  void CmdFlip()
  {
      print("Switching sides");
      facingRight = !facingRight;
      Vector3 SpriteScale = transform.localScale;
      SpriteScale.x *= -1;
      transform.localScale = SpriteScale;
  }
  
  void FaceDirCallback(bool newValue)
  {
      print(facingRight);
      print(newValue);
      facingRight = newValue;
  }
  </code></pre>