Problem rotating player with ServerRpc

I was making an online FPS game so when I was updating my look script I decided to use a ServerRpc for looking when trying with parallel sync the client could not look around here is my code:

using System.Collections;
using System.Collections.Generic;
using Unity.Netcode;
using UnityEngine;

public class NetworkLookAround : NetworkBehaviour
{
    [SerializeField] private float sensX;
    [SerializeField] private float sensY;
    [SerializeField] private Transform orientation;
    private float xRotation;
    private float yRotation;
    private void Start()
    {
        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible = false;
    }
    private void Update()
    {
        if (!IsLocalPlayer) return;
        float mouseX = Input.GetAxisRaw("Mouse X") * Time.deltaTime * sensX ;
        float mouseY = Input.GetAxisRaw("Mouse Y") * Time.deltaTime * sensY ;
        yRotation += mouseX;
        xRotation -= mouseY;
        xRotation = Mathf.Clamp(xRotation, -90f, 90f);
        if (IsServer)
        {
            this.transform.localRotation = Quaternion.Euler(xRotation, 0, 0);
            this.orientation.rotation = Quaternion.Euler(0, yRotation, 0);
        }
        else
        {
            Debug.Log("Using ServerRpc");
            TurnPlayerServerRpc(xRotation, yRotation);
        }
    }
    [ServerRpc]
    private void TurnPlayerServerRpc(float xRot, float yRot)
    {
        // Rotate The Camera
        transform.localRotation = Quaternion.Euler(xRotation, 0, 0);
        orientation.rotation = Quaternion.Euler(0, yRotation, 0);
        Debug.Log("ServerRpc Rotating player");
    }
}

The rpc is running as expected on the server but no rotation is being applied if you know whats going on please help

Is there a NetworkTransform on the same object and is the Y rotation axis checked?

Btw, the idea of sending the server the rotation info is not going to work anyway. You don’t want looking around to be affected by latency. You have to apply input locally and use a client authoritative NetworkTransform for the player.

yes a network transform and the object is being rotated is the camera which is nested under the network player
so I have to use the server rpc

edit: all rotation axis are checked to try and debug the issue

okay i updated as much as i could but I still need to rotate the orientation transform