Why isn't my camera follow script working?

Hi, I have a script called camera follow. It was working but when I added multiple characters and use them according to some value using if statements it doesn’t work. Here is the script:

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

public class CameraFollow : MonoBehaviour
{
public GameObject player;
public GameObject Jet1;
public GameObject Grim;
public GameObject Srm;
public GameObject A1R;
public GameObject TypeP2077;

public Vector3 offset;

// Use this for initialization
void Start()
{
	 int playerSelection = PlayerPrefs.GetInt("CharacterIndex");

    if(playerSelection == 0)
	{
        Jet1 = player;
	}
	else if(playerSelection == 1)
	{
		player = Grim;
	}
	else if(playerSelection == 2)
	{
		player = Srm;
	}
	else if(playerSelection == 3)
	{
		player = A1R;
	}
	else if(playerSelection == 4)
	{
		player = TypeP2077;
	}
}

// Update is called once per frame
void FixedUpdate()
{
	if (player != null)
	{
		Vector3 camPos = transform.position;
		Vector3 desiredPos = player.transform.position;

		Vector3 smoothedPos = Vector3.Lerp(camPos, desiredPos, 0.125f);

		transform.position = new Vector3(smoothedPos.x, transform.position.y, transform.position.z);
	}
}

}

So what is the problem and how can I fix it. the offset is x at 0 y at 0 and z at -10. I have referenced everything correctly.

first of all you are assigning Jet1 to player, not player to Jet1 in your first condition.

Did you check if you get the correct value from playerprefs? If it always returns 0 then your if would always jump into the first block resulting in player not being assigned anything.

One of the first things you should do when being faced with a problem is using Debug.Logs to see which code gets executed and which doesn’t. You can also check which values get passed where this way.