Move an object using slider

Hi guys,

I'm trying to create a slider script for an object to move it up and down but I can't seem to figure it out. This gets me the scrollbar...

var target : Vector3;
function OnGUI () 
{
   vScrollbarValue = GUI.VerticalScrollbar (Rect (25, 25, 100, 130), vScrollbarValue, 1.0, 0.0, 10.0);
}

I guess I need something like...

function Update() {
    transform.Translate((target-transform.position));
}

I'm not sure.

Set the position of the target by the value of the scroll bar:

var target : Transform;
function OnGUI () 
{
   vScrollbarValue = GUI.VerticalScrollbar (Rect (25, 25, 100, 130), vScrollbarValue, 1.0, 0.0, 10.0);
}

function Update ()
{
   target.position.y = vScrollbarValue;
}