Servo Motor not moving smoothly/slow

car.distance() just gets the distance the ultrasonic sensor detects in cm. and what is wrong with that code?