Why **if (!isLocaLPlayer)** is errors??

using UnityEngine;
using UnityEditor.Networking;

public class PlayerSetup : MonoBehaviour {

[SerializeField]
Behaviour[] componentsToDisable;

void Start ()
{
    if (!isLocaLPlayer)
	{
		for (int i = 0; i < componentsToDisable.Length; i++)
		{
			componentsToDisable*.enabled = false;*
  •   	}*
    
  •   }*
    
  • }*
    }
    Why if (!isLocaLPlayer) is errors??

isLocalPlayer is a property of NetworkBehaviours. You have it set as a MonoBehaviour.

Try changing your class declaration from this:

public class PlayerSetup : MonoBehaviour {

to this:

public class PlayerSetup : NetworkBehaviour {