Camera moving OnTriggerEnter

I’m trying to make a Camera that moves to a trigger (with y and z axis locked) when the player hits it but this script doesn’t work:

var target : Transform;
var Camera : Transform;
var Speed : float = 1.0f;

function OnTriggerEnter (other : Collider) 
{
 if(other.gameObject.tag == "Player") 
{
Camera.transform.position = Vector3.Lerp(Camera.position, target.position, Time.deltaTime * Speed);
}
}

I found the solution, now it works:

private var trigger : Transform;
private var Camera : Transform;
private var isLerp : boolean = false;
var Speed : float = 1.0f;

function Awake()
{
trigger = GameObject.FindGameObjectWithTag ("Trigger").transform;
Camera = GameObject.FindGameObjectWithTag ("MainCamera").transform;
}

function Update()
{
   if(isLerp)
   PositionChanging();
}

function PositionChanging ()
{
   Camera.transform.position = Vector3.Lerp(Camera.position, trigger.position, Time.deltaTime * Speed);
}

function OnTriggerEnter (other : Collider) 
{
if(other.gameObject.tag == "Player") 
  {
   isLerp=true;
  }
}

How can i Lock y and z Axis?

i tried 1Crio’s script, and t works beautifully for what i am trying to accomplish, a problem is that i have 2 triggers with this script only one is named something different and uses an identical script with a different “trigger” tag. but that causes the camera to move between a point between the 2 positions i want the camera to be in. it seems like its because the scripts are both trying to move the camera to both points at once. is there a way to make it so that doesnt happen?