Cant override bone transform in network animator

I want to have my player head rotate up and down with the camera. I have a script that sets the rotation of the target bone in late update and it works fine.
The problem is when my network animator animates my player, the late update does not override the transform for the clients or the host. It only correctly works for the owner.
First is the bone rotation code, second is where the script is attached.


I don’t know if its the most efficient solution but I figured it out.