Help me please with Unity Multiplayer

How to move players when they are spawned over network. This code working when is one player on the stage, but when more one player connect moving is crazy. One player moving another, camera is attached to wrong player and players are not synced. I tried game on two computers. On one computer players move, but on another computer players just stand. Thank you in advance!!!

This is my code:


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

public class Moving : NetworkBehaviour
{

public Camera cam;
public CharacterController controller;
public float speedH = 2.0f;
public float speedV = 2.0f;
public float yaw = 0.0f;
public float pitch = 0.0f;
public float movementSpeed=1.5f;
public Rigidbody rb;
public NetworkView nview;
void Start()
{
    nview = this.gameObject.GetComponent<NetworkView>();
    controller = this.gameObject.GetComponent<CharacterController>();
    rb = this.gameObject.GetComponent<Rigidbody>();
    Cursor.lockState = CursorLockMode.Locked;
    Cursor.lockState = CursorLockMode.None;
    
}

void Update()
{
    if(!isLocalPlayer)
    {
        return;
    }
    if(!nview.isMine)
    {
        cam.gameObject.SetActive(false);
    }
    if (nview.isMine)
    {

        this.controller.Move(new Vector3(0, -1, 0) * 2 * Time.deltaTime);
        Screen.lockCursor = true;

        yaw += speedH * Input.GetAxis("Mouse X");
        this.transform.localEulerAngles = new Vector3(0, yaw, 0);

        if (Input.GetKey(KeyCode.W))
        {

            this.controller.Move(new Vector3(cam.transform.forward.x, 0, cam.transform.forward.z) * 2 * Time.deltaTime);

        }

        if (Input.GetKey(KeyCode.S))
        {
            this.controller.Move(new Vector3(cam.transform.forward.x, 0, cam.transform.forward.z) * (-2) * Time.deltaTime);
        }

        if (Input.GetKey(KeyCode.A))
        {
            this.controller.Move(new Vector3(cam.transform.right.x, 0, cam.transform.right.z) * (-2) * Time.deltaTime);
        }
       
        if (Input.GetKey(KeyCode.D))
        {
            this.controller.Move(new Vector3(cam.transform.right.x, 0, cam.transform.right.z) * 2 * Time.deltaTime);
        }

        
    }
    
    }

}

For players to move on every computer add a ‘NetworkTransform’ Component to the player (More info: Unity - Manual: Network Transform).
For the camera to follow the local player try this:
In your moving script add:

public override void OnStartLocalPlayer()
{
		base.OnStartLocalPlayer();
		gameObject.name = "Local"; 
}

And to the Camera script that follows the player add this:

void Start()
{
	player = GameObject.Find("Local");
}
// Your follow code..