boolean wont toggle

I have a script with booleans that are called activeone and activetwo my script supposed to switch between true and false but it doesn’t

using UnityEngine;
public class button : MonoBehaviour
{
    public bool doorsstayactive;
    public GameObject[] acitvedoors;
    public GameObject[] notactivedoors;
    public bool activeone = true;
    public bool activetwo = false;
    public void Doors()
    {

        print("working");
        if (activeone == true)
        {
            activeone = false;
        }
        else
        {
            activeone = true;
        }
        foreach (GameObject door in acitvedoors)
        {
            door.SetActive(activeone);
        }
        if (activetwo == false)
        {
            activetwo = true;
        }
        else
        {
            activetwo = false;
        }
        foreach (GameObject door in notactivedoors)
        {
            door.SetActive(activetwo);
        }
    }
    public void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision.tag == "buttontrigger")
        {
            Doors();
        }
    }
    public void OnTriggerExit2D(Collider2D collision)
    {
        if(collision.tag == "buttontrigger" && doorsstayactive == false)
        {
            Doors();
        }
    }
}

and know the public void doors is working because it prints working so only the booleans aren’t working

To simplify the bools switching you could use:
activeone = !activeone;
That just sets activeone to the opposite of it’s current value. As for why the bools are working, try adding a debug log in the for each statement and log out the value of the bool you’re using. If that doesn’t show a log you might not have any doors set in your door arrays.
For example:
foreach (GameObject door in notactivedoors)
{
Debug.Log("activetwo is: " + activetwo);
door.SetActive(activetwo);
}