My photon is not syncing animators animations

I am trying to send animations over the photon but it’s not working
Here’s my Network Manager:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets.Characters.FirstPerson;

public class NetworkManager : MonoBehaviour {

public GameObject standbyCamera;
SpawnSpot[] spawnSpots;
// Use this for initialization
void Start () {
	spawnSpots = GameObject.FindObjectsOfType<SpawnSpot> ();
	Connect ();
}

void Connect()
{
	//PhotonNetwork.offlineMode = true;
	PhotonNetwork.ConnectUsingSettings ("1.0.0");
}

void OnGUI(){
	GUILayout.Label (PhotonNetwork.connectionStateDetailed.ToString ());
}

void OnJoinedLobby()
{
	Debug.Log ("OnJoinedLobby");
	PhotonNetwork.JoinRandomRoom ();
}

void OnPhotonRandomJoinFailed()
{
	Debug.Log ("OnPhotonRandomJoinFailed");
	PhotonNetwork.CreateRoom (null);
}

void OnJoinedRoom()
{
	Debug.Log ("OnJoinedRoom");

	SpawnMyPlayer ();
}

void SpawnMyPlayer()
{
	if (spawnSpots == null) {
		Debug.LogError ("WTF?!?!");
		return;
	}
	SpawnSpot mySpawnSpot = spawnSpots [Random.Range (0, spawnSpots.Length)];
	GameObject myPlayerGO = (GameObject)PhotonNetwork.Instantiate ("PlayerController 1", mySpawnSpot.transform.position, mySpawnSpot.transform.rotation, 0);
	standbyCamera.SetActive (false);
	//myPlayerGO.GetComponent<FirstPersonController>().enabled = true;
	myPlayerGO.GetComponent<PlayerMove> ().enabled = true;
	myPlayerGO.transform.FindChild ("Main Camera").gameObject.SetActive (true);
	myPlayerGO.GetComponent<Animator> ().enabled = true;
	myPlayerGO.GetComponent<SimpleMouseLook> ().enabled = true;
	myPlayerGO.GetComponent<NetworkCharacter1> ().enabled = true;
}

}

and here is my Network Character:

using UnityEngine;
using System.Collections;

public class NetworkCharacter1 : Photon.MonoBehaviour {

Vector3 realPosition = Vector3.zero;
Quaternion realRotation = Quaternion.identity;

Animator anim;

// Use this for initialization
void Start () {
	anim = GetComponent<Animator>();
	if(anim == null) {
		Debug.LogError ("ZOMG, you forgot to put an Animator component on this character prefab!");
	}
}

// Update is called once per frame
void Update () {
	if( photonView.isMine ) {
		// Do nothing -- the character motor/input/etc... is moving us
	}
	else {
		transform.position = Vector3.Lerp(transform.position, realPosition, 0.1f);
		transform.rotation = Quaternion.Lerp(transform.rotation, realRotation, 0.1f);
	}
}

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);
		stream.SendNext((float)anim.GetFloat("Speed"));
		stream.SendNext((bool)anim.GetBool("Jumping"));
	}
	else {
		// This is someone else's player. We need to receive their position (as of a few
		// millisecond ago, and update our version of that player.

		realPosition = (Vector3)stream.ReceiveNext();
		realRotation = (Quaternion)stream.ReceiveNext();
		anim.SetFloat("Speed", (float)stream.ReceiveNext());
		anim.SetBool("Jumping", (bool)stream.ReceiveNext());
	}

}

}

I have been looking for answer for hours.
My PUN version is 2.84.

Here are my errors NullReferenceException: Object reference not set to an instance of an object
NetworkCharacter1.OnPhotonSerializeView (.PhotonStream stream, PhotonMessageInfo info) (at Assets/Player Stuff/Scripts/NetworkCharacter1.cs:37)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
PhotonView.ExecuteComponentOnSerialize (UnityEngine.Component component, .PhotonStream stream, PhotonMessageInfo info) (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:553)
PhotonView.SerializeComponent (UnityEngine.Component component, .PhotonStream stream, PhotonMessageInfo info) (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:457)
PhotonView.SerializeView (.PhotonStream stream, PhotonMessageInfo info) (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:352)
NetworkingPeer.OnSerializeWrite (.PhotonView view) (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:4093)
NetworkingPeer.RunViewUpdate () (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:3962)
PhotonHandler.Update () (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:164)

and the other one

NullReferenceException: Object reference not set to an instance of an object
NetworkCharacter1.OnPhotonSerializeView (.PhotonStream stream, PhotonMessageInfo info) (at Assets/Player Stuff/Scripts/NetworkCharacter1.cs:46)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
PhotonView.ExecuteComponentOnSerialize (UnityEngine.Component component, .PhotonStream stream, PhotonMessageInfo info) (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:553)
PhotonView.DeserializeComponent (UnityEngine.Component component, .PhotonStream stream, PhotonMessageInfo info) (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:378)
PhotonView.DeserializeView (.PhotonStream stream, PhotonMessageInfo info) (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:363)
NetworkingPeer.OnSerializeRead (System.Object data, .PhotonPlayer sender, Int32 networkTime, Int16 correctPrefix) (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:4217)
NetworkingPeer.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2495)
ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (System.Byte inBuff)
ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands ()
ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands ()
PhotonHandler.Update () (at Assets/_IMPORTED/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:157)

I would do a test in the Update function to make sure you’re getting and setting your animator variables correctly.

Debug.Log(anim.GetFloat("Speed"));
Debug.Log(anim.GetFloat("Jumping"));

Make sure the name matches the one you set in the animator. If getting / setting the animator variables isn’t the issue, try using PhotonStream.Serialize. It’s what I’m using in my own project and it works.

void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) {
	if (stream.isWriting) {
		Vector3 pos = transform.position;
		Vector3 rot = transform.rotation;
		float speed = anim.GetFloat("Speed");
		bool jumping = anim.GetFloat("Jumping");

		stream.Serialize(ref pos);
		stream.Serialize(ref rot);
		stream.Serialize(ref speed);
		stream.Serialize(ref jumping);
	} else {
		Vector3 pos = Vector3.zero;
		Quaternion rot = Quaternion.identity;
		float speed = 0f;
		bool jumping = false;

		stream.Serialize(ref pos);
		stream.Serialize(ref rot);
		stream.Serialize(ref speed);
		stream.Serialize(ref jumping);

		realPosition = pos;
		realRotation = rot;
		anim.SetFloat("Speed", speed);
		anim.SetFloat("Jumping", jumping);
	}
}