FPS Weapon Switch Script

Hi i am currently working on a FPS and i was wondering how i would do a weapon switch animation where when i press “2” the gun will move down and the pistol will come out any ideas? i was testing this script but i cant see it slowly go down???

var GunUp : Vector3;
var GunDown : Vector3;
var GunMoveSpeed = 0.5;

function Start () 
{
transform.localPosition = GunUp;
}

function Update ()
{
		if(Input.GetKey("2")){
			transform.localPosition = Vector3.Lerp(transform.localPosition,GunDown,GunMoveSpeed*Time.deltaTime);
	}

		if(!Input.GetKey("2")){
			transform.localPosition = Vector3.Lerp(transform.localPosition,GunUp,GunMoveSpeed*Time.deltaTime);
	}
}

I don’t understand do you want this to work with two guns? if you do:(assuming they you want both weapons to end up in the exact vector

Should work

 var GunUp : Vector3;
 var Gun : GameObject;
 var pistol : GameObject;
 var GunDown : Vector3;
 var GunMoveSpeed = 0.5;
 
 function Start () 
 {
 transform.localPosition = GunUp;
 }
 
function switchGuns(var gun : GameObject, var pistol : GameObject){

 if(Input.GetKeyUp(KeyCode.Alpha1)){
                   pistol.transform.localPosition = Vector3.Lerp(pistol.transform.localPosition,GunDown,GunMoveSpeed*Time.deltaTime);

                   gun.transform.localPosition = Vector3.Lerp(gun.transform.localPosition,GunUp,GunMoveSpeed*Time.deltaTime);

   }

 if(Input.GetKeyUp(KeyCode.Alpha2)){
                   gun.transform.localPosition = Vector3.Lerp(gun.transform.localPosition,GunDown,GunMoveSpeed*Time.deltaTime);

                   pistol .transform.localPosition = Vector3.Lerp(pistol.transform.localPosition,GunUp,GunMoveSpeed*Time.deltaTime);

   }
}

 function Update ()
 {
    switchGuns(Gun,pistol);//Put in editor the gameobjects
 }