I don't think the motor is faulty because when I use the servo sweep example code, it rotates back and forth, but it still makes a clicking noise for a few seconds before it rotates.
This sounds like a broken gear in the servo.
Which model servo?
Did you buy it as a 360 servo or did you do the continuous rotation conversion yourself?