Help needed

I built a small Hexapod that runs on 12 9g micro servos, all of that is running on an Arduino MEGA.
The code is using MegaServo library so that I can run them smoothly. I tested out all the servos individually on a prototype shield. It all worked fine. But as soon as I tried to get them to work at the same time they all started doing their own thing independent of the code. Note that I connected the server to a separate power supply that is connected to a arduino troulgh a common GND.
Here's the code

#include <MegaServo.h>
#define NBR_SERVOS 12  // the number of servos, up to 48 for Mega, 12 for other boards
#define FIRST_SERVO_PIN 2 

MegaServo Servos[NBR_SERVOS] ; // max servos is 48 for mega, 12 for other boards
                               //B1=1, B2=2 ,B3=3 ,B4=4 ,B5=5 ,B6=6 ,A1=7 ,A2=8 ,A3=9 ,A4=10 ,A5=11 ,A6=12
int pos = 0;      // variable to store the servo position 
int i;
int po[12]={20,20,20,20,20,20,90,90,90,90,90,90};
int f=0;

void Fow(){
  for(i=0;i<3;i++)
    Servos[i].write(po[i]+f); //1-3B up
  for(i=7;i<10;i++)
    Servos[i].write(po[i]+f); //1-3A Fov
  for(i=10;i<12;i++)
    Servos[i].write(po[i]-f); //4-6A back
  for(i=0;i<3;i++)
    Servos[i].write(po[i]-f); //1-3B down
  for(i=4;i<7;i++)
    Servos[i].write(po[i]+f); //4-6B up
  for(i=7;i<10;i++)
    Servos[i].write(po[i]+f); //4-6A Fov
  for(i=10;i<12;i++)
    Servos[i].write(po[i]-f); //1-3A back
  if(f==20)
    f=0;
  else
    f++;
}

void setup(){
  for( i =0; i < NBR_SERVOS; i++)
    Servos[i].attach( FIRST_SERVO_PIN +i, 500, 2400);
  
  for( i =0; i < NBR_SERVOS; i++)
    Servos[i].write(po[i]);
}
void loop(){
  for(i=0;i<6;i++)
    Servos[i].write(po[i]+80);  //stnad
}

Note: void Fow() is not used right now
Thank you for your time

Could it simply be that you're expecting all the servos to reach their new positions in zero time?

Note that I connected the server to a separate power supply

What server? Do you mean servos? What power supply?

I meant to say Servos, the power supply that I used was adjustable power supply that was set to 5V and 1.5A max.

I tried to run all of the servos individually and it worked. I run the A servos(the ones connected to the pins 2-7) and it works fine. But when I try to run the b servos (8-13 on the arduino mega) they all bug out. Each of them do their own thing.

I meant to say Servos, the power supply that I used was adjustable power supply that was set to 5V and 1.5A max.

1500mA to drive a dozen servos?
That's optimistic.

6 of them seem to run run just fine on 5V 600mA(they are really small servos). That's not the point, as soon as the last 6 motors are involved the whole thing goes haywire.