look at the multiplayer shooter example
more precisely at the character movement, and at the "inputs" variable being sync'ed
this variable tells you what buttons the players are pressing, so in a for each loop you can set the animation depending on which button players are pressing without needing to add another variable to sync