Servo ( TowerPro MG995) only rotating in one direction with sweep code.

I have two continuous servo. The left one is only rotating in one direction. The weird thing is, when I connect the power supply to the 5V on the Arduino board, it works perfectly. But when I connect it to an external 6V power supply, it just rotates clockwise. The right servo works perfectly with both power supply.

The external psu is already connected with GND on Arduino.

I too had the same problem with the TowerPro MG995 servos. I bought 6 of mine from and have had nothing but problems with them. They never worked correctly regardless of the power supply used. I think 2 of the servos were opened because several of the long screws that hold the plastic body together were not screwed all the way in. I even tried to use the servos with an Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685 and all the servos did was sit there and buzz and vibrate.

Bottom line: these are digital servos and I will use analog...So basically, I just got screwed on the servos.

I hope you have better luck than I did.