bool not working

Hi so I am trying to make it so when you hit with your left hand, the next time you hit will be with your right hand and vice versa. Currently, when you hit with your left hand the next time you hit will be with your right hand which is good, however it just stops working after that.

  bool canHit = true;
     bool nextArm = true;
 
     public GameObject LeftArm;
     public GameObject RightArm;
 
     IEnumerator hitting()
     {
         yield return new WaitForSeconds(1);
         canHit = true;
     }
 
     IEnumerator waitForArm()
     {
         yield return new WaitForSeconds(2);
         nextArm = true;
     }
 
  if (Input.GetKeyDown(KeyCode.Mouse0) && canHit)
         {
             canHit = false;
             if (nextArm == true)
             {
                 LeftArm.GetComponent<Rigidbody>().velocity = new Vector3(0, 0, 5);
                 nextArm = false;
                 StartCoroutine(hitting());
             }
             else
                 RightArm.GetComponent<Rigidbody>().velocity = new Vector3(0, 0, 5);
             StartCoroutine(waitForArm());
         }
     }

Everything looks fine, just a little messing so you got lost in the switching of two booleans.

    bool canHit = true;
    bool isRightArm = true;

    public GameObject LeftArm;
    public GameObject RightArm;

    IEnumerator hitting()
    {
        yield return new WaitForSeconds(1);
        canHit = true;
    }

    void SomeMethod()
    {
        if (Input.GetKeyDown(KeyCode.Mouse0) && canHit)
        {
            Vector3 hitVector = new Vector3(0, 0, 5); //<use the "new" keyword only once (new = GarbageCollection)

            //hit availability stuff
            canHit = false;
            StartCoroutine(hitting());

            //do this
            if (isRightArm == true) { RightArm.GetComponent<Rigidbody>().velocity = hitVector; }
            else { LeftArm.GetComponent<Rigidbody>().velocity = hitVector; }

            isRightArm = !isRightArm; //toggle the bool
        }
    }