Ok so i got it moving up and down well bassicly this is what i wrote, what do i write after speed.
var moveUp : KeyCode;
var moveDown : KeyCode;
var moveRight : KeyCode;
var moveLeft : KeyCode;
var speed : float = 10;
function Update ()
{
if (Input.GetKey(moveUp))
{
rigidbody2D.velocity.y = speed;
}
else if (Input.GetKey(moveDown))
{
rigidbody2D.velocity.y = speed *-1;
}
else if (Input.GetKey(moveRight))
{
rigidbody2D.velocity.y = speed ;
}
else if (Input.GetKey(moveRight))
{
rigidbody2D.velocity.y = speed;
}
else
{
rigidbody2D.velocity.y = 0;
}
}