Camera Target Switch By Tag HELP!

I am trying to make my smooth follow script which is on my camera, to change targets but I am having a hard time scripting this. here is my code

var camera : Camera;
var object : Transform;
function Start () {
object = transform.FindWithTag ("Player").transform;
Camera.LookAt(object);
}

Depends on how you want to handle the transition.

  1. If you want the camera to smoothly translate to the next target, you’ll need to do some math and find the point X distance behind the new target and smoothly (with a certain speed and acceleration) move towards it every update.

  2. If you want the transition to be instantaneous, what I did was have a separate camera following each target and then just switch between those

Example:

public Camera Current;
    
void Switch(Camera cam) {
    Current.enabled = false;
    Current = cam;
    Current.enabled = true;
}

And to get a camera of an object you got by a tag, you can call its GetComponentInChildren< Camera >() function.