# Unity Network Flip sprite renderer

So my 2D characters turn by setting flipX on Sprite Renderer. I'm trying to turn them on other clients, but sprite is turning only on local client. And only host turns for all clients.

Here's my code:

RpcTurnChar(GetComponent<SpriteRenderer>().flipX, this.gameObject);

. . .

[ClientRpc]
void RpcTurnChar(bool flip, GameObject plr)
{
plr.GetComponent<SpriteRenderer>().flipX = flip;
}


What am I doing wrong?

• Why are you trying to send flip data? You could simply put a check that will flip the sprite on client side, reducing data usage between clients. Something like: if(( position.x - previousPosx ) < 0 ){ flip = true; } else { flip = false; } previousPosx = position.x; – John Hamilton Nov 28 '17 at 11:57
• My characters turn by looking at player's cursor, so I have to check where the cursor is on the client side and send flip data to server. – KiRa937 Nov 28 '17 at 14:05
• Ah, that makes sense. Though if your game is anything like Soldat, you could use some other data like weapon angle to determine which way the players are looking. Anyway, I'm just trying to give you more options ;) – John Hamilton Nov 29 '17 at 4:56