camera . smooth follow

Okay so i have a big problem in making my camera follow my target AFTER switching scenes
here is a piece of the code which will help you to understand my problem

camR = GameObject.Find(“cameraRoll”);

cameraRoll is the name of my camera
camR is a gameObject

I think i just need to attach a smooth follow script to my camera but IN CODE and i have no idea how to do that .

if i could have the smooth camera script attached to camR then do this camR = GameObject.Find(“cameraRoll”); it would probably make my camera follow my target perfectly after switching scenes right ?

how is this done ? i have tried to make it work countless times .

You do not have to add it in script. Put that entire script it in a “function” and then call that function whenever you want by typing it like so:

function nameOfFunction()
{//insert script}

//call function

for more information on functions go here: Unity Tutorials - B28 - SendMessage to external functions - - YouTube