Simple movement

Hi guys I have a simple question which is, how can I move an empty game object forward and backwards with keyboard input ?

edit: here is what I have tried

function Update () {
var controller : CharacterController = GetComponent(CharacterController);
var h = Input.GetAxis(“Vertical”);

// if theres keyboard input move the object

if(h)
{
controller.Move(h,0,0);
}
}

am I along the right lines ?

you missing give information about speed, and it go how fast it can

try add thi on top

private var motor : CharacterMotor;

// Use this for initialization
function Awake () {
 motor = GetComponent(CharacterMotor);
}

try to read “FPSInputController” and “character motor” in standard asset to see how it work

Please use the script reference and Google.

Unity Script Reference - CharacterController.SimpleMove