Could a sweating pipe in the attic drip water onto the ceiling?
Probably this is the refrigerant gas return line to the compressor. It will be cold (maybe 45 or 50 F) and water vapor will condense to liquid water on it. It must be insulated and the insulation must be sealed or it will get wet between the pipe and the insulation. Keeping the line insulated will also make the a/c compressor work more efficiently and possibly last longer.

The gas return line is copper and will be the larger diameter line of a pair of copper lines which connect the evaporator unit (in the attic or in a closet on an occupied floor) to the condensing unit (compressor) outside the structure (usually on the ground).

If the evaporator unit is in the attic, then the line carrying condensed water may also be in the attic and this line may also proceed horizontally in the attic to and through an exterior wall and then terminate outside that wall where the condensate drips. The condensate line may be copper or may be plastic. This line will also be cold, but usually not as cold as the refrigerant gas return line.

EDIT

The refrigerant gas return line (larger copper tubing) will be cold when the compressor is running, but will warm up to ambient when the compressor is off.