How do I make an imported asset into a character which can only move along one axis?

I have imported a model from 3ds which is a robotic arm on a linear rail. I am new to unity and javascript and I need to make the arm move along the rail in fixed increments of a specified distance whilst having a smoothly animated movement between the points.

Can anyone help?

Thanks

1 Answer

1
function Update() {
 if(Input.GetButton("UP")){
        // Move the object forward along its z axis 1 unit/second.
        transform.Translate(Vector3.forward * Time.deltaTime);
 }
}