slowing down servo movement also controlled by gyro

Hi everyone, i have a really big servo connected to its own power supply then an arduino nano communicating with it. Its controlled by a gyro sensor but the servo is really glitchy. I have a hunch that its due to unregulated voltage but I want to try something first. When I slow down the servo movement with just a simple delay it works but its choppy. Ive been trying to figure out some code to put a proper delay in but I have had no luck. Ive tried a for function but my problem is I am getting readings from a gyro that I have in the variable value so how do I write the for function the proper way. ill give n example of some code below. When I run this the servo just sweeps back and forth. I dont know how to program the for function to have a delay on the servo as it goes to the gyros position. Much help needed. Thankyou.

#ifdef OUTPUT_READABLE_YAWPITCHROLL
    // display Euler angles in degrees
    mpu.dmpGetQuaternion(&q, fifoBuffer);
    mpu.dmpGetGravity(&gravity, &q);
    mpu.dmpGetYawPitchRoll(ypr, &q, &gravity);
    value = (180 - (90 + ypr[2] * 180 / M_PI));
    int pos = 0;
    for (pos = 0; pos <= value; pos += 1) { // goes from 0 degrees to 180 degrees
      // in steps of 1 degree
      myservo.write(pos);              // tell servo to go to position in variable 'pos'
      delay(15);                       // waits 15ms for the servo to reach the position
    }

    for (pos = 0; pos >= value; pos -= 1) { // goes from 0 degrees to 180 degrees
      // in steps of 1 degree
      myservo.write(pos);              // tell servo to go to position in variable 'pos'
      delay(15);                       // waits 15ms for the servo to reach the position
    }
    
    Serial.print("Roll   \t");
    Serial.println(value);

#endif


  }


}

Thank you for our time and effort.

I suspect that it is not the servo that is glitchy but instead the gyro readings.
What values are you getting out of your servo? Are they changing smoothly or do they jump all over when you move the gyro?

If they jump all over, you might need to smooth the reading values from the gyro.

The gyro readings are perfectly smooth I know its the servos because it works with 9g servos aswell.

delay(15); // waits 15ms for the servo to reach the position

This will act like rocks in your bearings. 15 ms of nothing tells the servo to stop.

-jim lee