If your vehicle is showing power door locks click rapidly but fail to lock or unlock, here are the most likely causes and the parts you'll need to fix each one.
The internal motor or gears in the door lock actuator wear out, causing it to lack the strength to fully engage. It bounces back and forth, creating a rapid clicking or 'machine gun' noise.
Dirt, dried grease, or physical wear can cause the door latch and lock linkage to bind. The actuator tries to move the lock but hits resistance and rapidly cycles.
A weak battery or corroded wiring can prevent the actuators from getting enough power to complete their full movement, resulting in a rapid clicking sound, especially when the engine is off.
The computer or relay that controls the door locks may be malfunctioning, sending rapid, erratic power pulses to all the actuators simultaneously.