2 inputs not working together?

Albiet I just started learning and these inputs are in different scripts but they still dont work together. First one is this:

if(Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.A))
        {
           //do something
        }
        else if (!Input.GetKey(KeyCode.D) && Input.GetKey(KeyCode.A))
        {
            //do another something
        }
        else
            //do something else

And second one is:

if (Input.GetKeyDown(KeyCode.Mouse0))
            //Its doing something way different 

I dont know why but if first part works long enough, second part starts working too. I’ve looked at any other cause in scripts that would not allow them to work together and simply couldn’t find anything. Whole thing is actually really simple and it totally stumps me!

If you’re using an else if statement I don’t think it’s necessary to have the && “other input”

Instead of using “if (Input.GetKeyDown(KeyCode.Mouse0))” try using “if (Input.GetAxis(“Fire1”) >0)”