how to find local player in multiplayer game?

so I have trouble finding local player to attach camera to it.
I used following script to make camera follow the player

 //attach this script to camera
GameObject Player;
public Vector3 offset;
void Update ()
{
    Player = GameObject.FindWithTag("Player");
    transform.position = Player.transform.position + offset;
}

notice that find game object is in update method and not in start method because when game starts there is no player in scene and when player spawns in the scene, script couldnt find it because it only looks once. also notice I’m finding player with its tag. so with this script when I hit play and spawn player, camera does follow player.
.
but the problem is script doesnt know which one is local player so it starts following the first player that spawns in the scene. when client player joins the server, camera of client player hovers over host player only and doesnt follow that client player. so I used following script to make camera follow local player only.

//attach this script to camera instead of one above.
GameObject Player;
public Vector3 offset;
void Update ()
{
    Player = GameObject.FindWithTag("Player");
    if (isLocalPlayer)
    {
        transform.position = Player.transform.position + offset;
    }
    else
    {
        return;
    }
}

(FYI because this script is driven by network behavior camera has network identity component attached to it and I have tick marked local player authority). and suddenly camera doesnt follow either of the player, ie host player and client player. that means it couldnt find gameobject with “player” tag on it. or maybe problem is something else I dont know.
what I think is happening with 2nd script is with isLocalPlayer function it is finding camera itself as a local player (because local player authority is tick marked) and not the actual player of the game.
.
so may be this is not how you find local player. so I’m looking for a way to find local player and make my camera follow it. ie host camera follow host player and client camera follow client player. thank you in advance.

What I would do is include the camera and player in the same Player Prefab, if you are trying to make an individual view. Like the picture below.121929-multiplayercamsetup.png
The script I use to make smooth camera movement is a Vector3.Lerp. Here is the simplified code.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FixCamToPlayer : MonoBehaviour {
public Transform Player;
public float Speed = 1;
public Transform Pivot;
	// Use this for initialization
	
	// Update is called once per frame
	void FixedUpdate () {
		if(Player != null) {
		Pivot.position = Vector3.Lerp(Pivot.position, Player.position, Speed);
							}
	}
}

A Speed value of 1 will lock it onto the character rather than moving towards player. Using fixed update, it will update every frame, to keep it clean.

If I did not answer your question the way you wanted, let me know! Hope this helps!

//attach to camera
public class CameraSc : NetworkBehaviour
{
GameObject Player;
public Vector3 offset;

     public void SetPlayer(Transform newPlayer)
     {
         Player = newPlayer;
     }

     void Update ()
     {
         if(!isLocalPlayer)
             return;
         if(!Player)
             return;

         transform.position = Player.transform.position + offset;       
      }
 }

//attach to player
public class PlayerSc : NetworkBehaviour
{
    void Start()
   {
       if(!isLocalPlayer)
          return;

        if(GameObject.FindObjectOfType<CameraSc>())
            GameObject.FindObjectOfType<CameraSc>().SetPlayer(transform);
       else
            Debug.LogError("Camera Not Found");
   }
}