Question:
It's possible that you have a problem with your AC compressor clutch. The clicking sound you hear may be the clutch engaging and disengaging due to a faulty electrical connection or a worn clutch. If the clutch is not engaging properly, the AC system may not work consistently, which could explain why it works sometimes and not others. It's best to have a mechanic diagnose the issue and make any necessary repairs to avoid further damage to your AC system.