How to make your camera move to the middle of the player photon c#?

This is the script I’m using:

using UnityEngine;

public class FollowPlayer : MonoBehaviour {

public Transform player;
public Vector3 offset;

// Update is called once per frame
void Update()
{
    transform.position = player.position+offset;
    transform.eulerAngles = player.eulerAngles;
}

}

[Command]
public void(GameObject Me, Vector3 v){
Me.transform.position = v;
TargetMove(Me.GetComponent().connectionToClient)
}
that’s how to send data to server

to send data to specific client

[TargetRpc]
        public void TargetMove(NetworkConnection Target, Vector3 v)
        {
            transform.position = v;
        }

that’s robust code and is only ment to send data or recieve data from single pc. server-client

don’t forget it has to be in : NetworkBehaviour abstract class

I’m using mirror asset witch is free

You need to use the PhotonView component so that only your camera moves, not any other players