Changing the camera from first person to third person.

I want my player to be able to switch between a first person camera and a third person camera. This is the code I have but when I switch I can’t move my player any more.

    var camera1 : Camera;
     
    var camera2 : Camera;
  
     
    function Start () {
     
    camera1.camera.active = true;
     
    camera2.camera.active = false;
       
    } 
     
    function Update () {
     
    if(Input.GetKeyDown("c")) {
     
    camera1.camera.active = false;
     
    camera2.camera.active = true;
        
    }
        
    if(Input.GetKeyDown("v")) {
     

    camera2.camera.active = false;
     
    camera1.camera.active = true;
        
    }  
     
    }

Do the following :

1)Place the script on an empty game object in the world.
2)Assign variables in the inspector
3)It should work now, If you previously kept the script enabled in the camera, it would not work, It must be assigned to an object apart from the ones you are activating/deactivating.