my AC started causing my truck to stall occasionally
Bad/dirty IAC valve would cause this.
when it was on and would click horribly
Too little/too much freon or too little air flow through the radiator will cause the compressor to cycle repeatedly.
i turned the AC on and no clicking occured (and obviously no stalling cus the engines off)
You probably would not hear any clicking with the engine off.
The clicking you hear is the electric clutch on the a/c compressor engaging.It usually makes more noise when the engine is running.