Need help with my first project

  myServo.attach(servoPin);

When you attach() the servo it will initially move to its default starting position of 90 degrees. However, if you write() the required starting position to it before attaching it then it will move to, or more importantly, stay in that position if it is already there