Why when i read a variable of an another script, with GetComponent it seems that fails?

I access at a variable of Transform type in an another script and try to write its length with Debug.Log method but nothing is writer`

Moving Script:

public class Moving : MonoBehaviour {

	private Spawn spawnScript;
	void Awake ()
	// Use this for initialization
	void Start () {
		spawnScript = GetComponent<Spawn>();
	// Update is called once per frame
	void Update () {
		Debug.Log("Number WP: "+spawnScript.waypoints.Length);

Spawn script:

public class Spawn : MonoBehaviour {

// spawn Intervall
    public float interval = 1.5f;
    public int numOfEnemies;
    float timeLeft = 0.0f;
public Transform[] waypoints;
private float distance;
private Quaternion newRot;
private Vector3 _direction;
public float velocityMove,velocityTurn;
    // gameobject to be spawned
    public GameObject enemy = null;
    // Update is called once per frame
    void Update () {
        timeLeft -= Time.deltaTime;

        if (timeLeft <= 0.0f && numOfEnemies > 0) {
            // spawn
            GameObject g = (GameObject)Instantiate(enemy,transform.position,Quaternion.identity);
			timeLeft = interval;

If you attach both scripts in the same Object, it’ll work perfectly, but if they are in different objects you have to find this object first… something like this…

GameObject GO = GameObject.Find("other");
spawnScript = GO.gameObject.GetComponent<Spawn>();
Debug.Log("Number WP: "+spawnScript.waypoints.Length);