How to use 2d array in more than one location in script from another script

Let’s say I have script A and script B.

I want the 2d array from script B to be used in script A. I know you have to do something like this to get objects from the other script to another

 GameObject Script_B = GameObject.Find("ScriptB_Object");
ScriptB scriptB = Script_B.GetComponent<ScriptB>();

and i have this inside one function using the 2d array from the other script

string[][] wordtemp=ScriptB.parsedValues;

but I want to use that word temp in other function in Script A not just the one that its declared in.

I have tried declaring word temp on top and setting the value to ScriptB.parsedValues in the Start() function but I got a null reference when I did that

Any suggestion would be helpful

Your question is not very clear, but you are doing what you need to do as far as I understand what you are saying.

In any function in Script A you can use the mechanism you wrote to get access to the parsedValues from an instance of ScriptB on some other game object.

I think what you are asking is how to make a single reference in Script A that you can use everywhere.

You can declare the reference as a class variable (before any methods):

string[][] wordtemp;

The in your Start():

void Start() {
  GameObject Script_B = GameObject.Find("ScriptB_Object");
  ScriptB scriptB = Script_B.GetComponent<ScriptB>();
  wordtemp = ScriptB.parsedValues;
}

Now you can use wordtemp anywhere. Of course it assumes that ScriptB’s parsedValues is setup properly too.