Best motor for sliding part of robot?

A servo Might do the job for short distance otherwise consider a stepper motor.