read script from onther one ?

Hi …

is there any way to read the value from other script;
this is the idea .

example :

Script_1.js
var Age = 25;

Script_2.js
var OtherScript : MonoScript;
function Start()
{
	OtherScript = GetComponent("Script_1"); // I need the script's name to be string
	print( OtherScript.Age );
}

Note : both Script_1.js & Script_2.js connected the the same object .

As Iwaldrop said, your code should work just fine, after your corrected the typos (e.g. its MonoBehaviour. Not MonoScript).

You can get any other component of your same GameObject by just passing the string-name of the other class to GetComponent().

Script_1.js:

var age = 25;

Script_2.js:

var otherScript : Script_1;
function Start()
{
    otherScript = GetComponent.< Script_1>();
    print(otherScript.age);
}

Link to Unity Docs, GetComponent