bools not changing?

this is supposed to spawn different characters and set the z axis and some bools from another script. for some reason its not changing the value of the bool, does anyone know why?
public dimension_counter dimcount;
private GameObject firstperson;
private GameObject thirdperson;
private GameObject twod;
private GameObject fperson;
private GameObject tperson;
private GameObject td;
Vector3 zaxis;
// Use this for initialization
private void Awake()
{
firstperson = Resources.Load(“firstpersonplayer”) as GameObject;
thirdperson = Resources.Load(“thirdpersonplayer”) as GameObject;
twod = Resources.Load(“player”) as GameObject;
dimcount = GameObject.Find(“dimensionmanager”).GetComponent<dimension_counter>();

}
void Start () {
fperson = GameObject.Find(“firstpersonplayer”);
tperson = GameObject.Find(“thirdpersonplayer”);
td = GameObject.Find(“player”);
}

// Update is called once per frame
void Update () {
    if (fperson == null) {
        dimcount.firstdimension = false;
    }

    if (tperson == null)
    {
        dimcount.seconddimension = false;
    }

    if (td == null)
    {
        dimcount.thirddimension = false;
    }

    if (fperson != null)
    {
        dimcount.firstdimension = true;
    }
    if (tperson != null)
    {
        dimcount.seconddimension = true;
    }
    if (td != null)
    {
        dimcount.thirddimension = true;
    }
    if (Input.GetKeyDown(KeyCode.I) && dimcount.firstdimension == false) {
        if (dimcount.thirddimension == true)
        {
            gameObject.transform.position += new Vector3(0, 0, zaxis.z);
        }
        Instantiate(firstperson, transform.position, Quaternion.identity);
        dimcount.thirddimension = false;
        dimcount.seconddimension = false;
        dimcount.firstdimension = true;
        Destroy(gameObject);
    }
    if (Input.GetKeyDown(KeyCode.O) && dimcount.seconddimension == false)
    {
        if (dimcount.thirddimension == true) {
            gameObject.transform.position += new Vector3(0,0, zaxis.z);
        }
        Instantiate(thirdperson, transform.position, Quaternion.identity);
        dimcount.thirddimension = false;
        dimcount.seconddimension = true;
        dimcount.firstdimension = false;
        Destroy(gameObject);

        
    }
    if (Input.GetKeyDown(KeyCode.P) && dimcount.thirddimension == false)
    {
        
        zaxis = gameObject.transform.position;
        Instantiate(twod, new Vector3(transform.position.x, transform.position.y,0), Quaternion.identity);
        dimcount.thirddimension = true;
        dimcount.seconddimension = false;
        dimcount.firstdimension = false;
        Destroy(gameObject);
        
    }
}

The boolean variables do change, but you set them back every update:

 if (fperson == null) {
     dimcount.firstdimension = false;
 }
 if (tperson == null)
 {
     dimcount.seconddimension = false;
 }
 if (td == null)
 {
     dimcount.thirddimension = false;
 }
 if (fperson != null)
 {
     dimcount.firstdimension = true;
 }
 if (tperson != null)
 {
     dimcount.seconddimension = true;
 }
 if (td != null)
 {
     dimcount.thirddimension = true;
 }

This code can also be simplified. Those 3 lines do exactly the same as your 6 if statements:

dimcount.firstdimension = fperson != null;
dimcount.seconddimension = tperson != null;
dimcount.thirddimension = td != null;

However you should execute those only once in start. An alternative would be after Instantiating the appropriate prefab you should assign the created instance to your fperson / tperson / td variables.

I’m not sure why you use those variables in the first place. You could do the null check with the corresponding variable (fperson / tperson / td) instead of those bools.