Animation won't stop (Solved)

So I have a script were if the Player presses and holds Q or E the player Rotates but when I release Q or E it does not stop, and go back to idle. If I press Q and then E it changes to different rotates, but if I just press Q or just press E it stays playing those animations.

if (Input.GetKey(KeyCode.Q))
{
float rotationQ = Input.GetAxis(“HorizontalQE”) * turnSpeed;
rotationQ *= Time.deltaTime;
transform.Rotate(0, rotationQ, 0);

        if (isIdle == true)
        {
            anim.SetBool("isTurnLeft", true);
            anim.SetBool("isTurnRight", false);
            isIdle = false;
        }
        else {
            anim.SetBool("isTurnLeft", false);
            isIdle = true;
        }
        if (Input.GetKeyUp(KeyCode.Q))
            isTurnLeft = false;
        }
        else if (Input.GetKey(KeyCode.E))
        {
        float rotationQ = Input.GetAxis("HorizontalQE") * turnSpeed;
        rotationQ *= Time.deltaTime;
        transform.Rotate(0, rotationQ, 0);

        if (isIdle == true)
        {
            anim.SetBool("isTurnRight", true);
            anim.SetBool("isTurnLeft", false);
            isIdle = false;
        }
        else {
            anim.SetBool("isTurnRight", false);
            isIdle = true;
        }
        if (Input.GetKeyUp(KeyCode.E))
            isTurnLeft = false;
    }

You are forgetting to reset the bools if there is no input:

if (Input.GetKey(KeyCode.Q))
        {
            float rotationQ = Input.GetAxis("HorizontalQE") turnSpeed; rotationQ = Time.deltaTime; transform.Rotate(0, rotationQ, 0);

            if (isIdle == true)
            {
                anim.SetBool("isTurnLeft", true);
                anim.SetBool("isTurnRight", false);
                isIdle = false;
            }
            else {
                anim.SetBool("isTurnLeft", false);
                isIdle = true;
            }
            if (Input.GetKeyUp(KeyCode.Q))
                isTurnLeft = false;
        }
        else if (Input.GetKey(KeyCode.E))
        {
            float rotationQ = Input.GetAxis("HorizontalQE")*turnSpeed;
            rotationQ *= Time.deltaTime;
            transform.Rotate(0, rotationQ, 0);
            if (isIdle == true)
            {
                anim.SetBool("isTurnRight", true);
                anim.SetBool("isTurnLeft", false);
                isIdle = false;
            }
            else
            {
                anim.SetBool("isTurnRight", false);
                isIdle = true;
            }
            if (Input.GetKeyUp(KeyCode.E))
                isTurnLeft = false;
        }
        else
        {
            anim.SetBool("isTurnRight", false);
            anim.SetBool("isTurnLeft", false);
        }

lol omg I feel so dumb, thanks