2d camera script not working

Im pretty new so i dont know what I’m doing much . its telling me that the variable player isn’t assigned and I cant figure it out

    public Vector3 target;
    public GameObject player;
    void start()
	{
 
	}
    void FixedUpdate()
    {
        target = player.transform.position;
        transform.position = target;
    }

@khuzaku In your scene, the object that has this script of yours assigned to it. If you select that object in the hierarchy and see the inspector window, you’ll see that it has 2 fields there (those public ones): Target and Player.
In this case you forgot to assign the player object to that field.

After passing the player do this:

     public GameObject player;

     private Vector3 target;
     private float zOffset;     

     void Start()
     {
           zOffset = transform.position.z - player.transform.position.z;
     }

     void LateUpdate()
     {
         target = player.transform.position;
         target.z -= zOffset;
         transform.position = target;
     }

did you drag the player to the player GameObject in the Inspector ? @khuzaku