Change Camera on (Right) Mouse Click

Hello, I need help on this one. I’m trying to make a TPS. One of the basic features is if you hold RMB, the camera is switched to another camera. Now, I’m very bad at coding so I’ll need your help. Would you kindly…?

Could this code be useful?

public Camera camera1;
public Camera camera2;
void Update(){
    if (Input.GetMouseButtonDown(1)){  = false; = true;
    } else 
    { = true; = false;

Then you just have to assign camera1 and camera2 in the inspector on the object you assign this script on.

Update please