Wierd issue

Hello all
Im having a problem with some code i wrote... essentially i have an arduino controlling 2 dc motors and a servo motor. in the program the are used at completely different times but the main issue here is, when i insert this bit of code:

#include <Servo.h>
Servo myservo; // Servo

void setup (){
myservo.attach(6);
}

the motors dont want to run. the motors are connected to separate pins and all. As soon as i remove those lines of code the motors work normally in my program. So how can i get both of these to work peacefully. Thank You

Traditionally, at this juncture, there is a request to post all your code. A schematic might be helpful too.

Just a guess, but Servo library disables pwm on pins 9 and 10 on the Uno. If your motors are on those pins they won't work.

omg you are a genius... i never knew that... i switched my enable motor pin to a different one and it works!!!!.... THANK YOU!!!!

You are welcome.