Photon Stream animation

Hi, I’m trying to play a legacy animation (not using an animator) so that it is visible by the other player. I know how to send it, but how would i receieve it? Thanks in advance for any help.

	public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) {
		if(stream.isWriting) {
			// This is OUR player. We need to send our actual position to the network.
			stream.SendNext(transform.position);
			stream.SendNext(transform.rotation);
			if(anim.animation.IsPlaying("Swing"))
				stream.SendNext(anim.animation.Play("Swing"));
		}
		else {
			// This is someone else's player
			realPosition = (Vector3)stream.ReceiveNext();
			realRotation = (Quaternion)stream.ReceiveNext();
			//anim.animation.IsPlaying("Swing") = (bool)stream.ReceiveNext(); <---Doesn't work :( how do i receive it?
		}
	}

I had the same issue trying to get PUN to sync legacy animation. This is what I did that worked for me:

   public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) {
    		if(stream.isWriting) {
    			//This is our player, sent pos to network
    			stream.SendNext (transform.position);
    			stream.SendNext (transform.rotation);
    			if(anim.animation.IsPlaying("walk")){stream.SendNext(useThisMove = 1);}else{stream.SendNext(useThisMove = -1);}
    		}
    		else{ //elses player, recive their pos
    			realPosition = (Vector3)stream.ReceiveNext();
    			realRotation = (Quaternion)stream.ReceiveNext();
    			useThisMove = (int)stream.ReceiveNext(); //This is how I received the data, I just used an int.
    		}
    	}

Then I added this in the update:

    if(useThisMove == 1){anim.animation.Play("walk");}else{if(useThisMove == -1){anim.animation.Play("idle");}} //else won't work.

I used this in the update to change the animation of anyone who had the “useThisMove” var changed. I also needed to make sure I had well written animation code or the animation wouldn’t stop. I’m sure my code is messy, but it works.