Syncing Bone Rotations

Here is the script that I use to sync bones but for some reason its not syncing



void OnAnimatorIK()
{
if(PV.IsMine)
{
anim.SetLookAtWeight(0.7f, 0.5f);
anim.SetLookAtPosition(targetFocus.position);
}
}

void Update()
{
if(PV.IsMine == true && _syncBones == true)
{
if (currentBoneRate == _syncBonesRate)
{

currentBoneRate = 0;
PV.RPC("RPC_UpdateBoneRotations", RpcTarget.AllBuffered, local_head.localRotation, local_neck.localRotation, local_spine.localRotation, local_chest.localRotation);

}
else
{
currentBoneRate += 1;
}
}
if (_syncBones == true && PV.IsMine == false)
{
Debug.Log("Attempting to sync bones for other clients");
local_head.localRotation = Quaternion.Lerp(local_head.localRotation, correctBoneHeadRot, Time.deltaTime * _boneLerpRate);
local_neck.localRotation = Quaternion.Lerp(local_neck.localRotation, correctBoneNeckRot, Time.deltaTime * _boneLerpRate);
local_spine.localRotation = Quaternion.Lerp(local_spine.localRotation, correctBoneSpineRot, Time.deltaTime * _boneLerpRate);
local_chest.localRotation = Quaternion.Lerp(local_chest.localRotation, correctBoneChestRot, Time.deltaTime * _boneLerpRate);
}
}

[PunRPC]
void RPC_UpdateBoneRotations (Quaternion h, Quaternion n, Quaternion s, Quaternion c)
{
Debug.Log("SyncingBones");
correctBoneHeadRot = h;
correctBoneNeckRot = n;
correctBoneSpineRot = s;
correctBoneChestRot = c;

}

Comments