The way I did it was much more confusing. Good tutorial. Here's my code if you were wondering.
Debug.Log(GameObject.Find("GAME OBJECT WITH TARGET SCRIPT").GetComponent<Script1>().CoolVariable);
ooh ok