So i have been trying to change the target of the camera a variable within the same script that has the camera lock onto a specific object by having the player click on the object when the Raycast detects any object with the tag "Cell" .
I can't seem to be able to change the Target variable i have tried using a string that records the name of the raycast object and then applies it to the target but it does not help at all.

string TargetName = "Targetsname";
RaycastHit vHit = new RaycastHit();
Ray vRay = Camera.main.ScreenPointToRay(Input.mousePosition);
TargetName = vHit.transform.gameObject.name;
if (vHit.transform.gameObject.tag == "Cell" && Input.GetMouseButtonDown(1))
{

this.target = Targetname;

}

Any help you can give will be much appreciated
Thanks for your time and patience.