How to reference GUI text?

I’ve created a GUI text, and it’s path is Canvas>MouseSelection.

I’ve tried a lot of different code consisting of GameObject.Find, GetComponent etc.

I also tried just making the GUIText object public and dragging it, but that didn’t work either!

Halp ):

Assuming that you are using Unity 4.6’s new UI system, try putting on top of your code “using UnityEngine.UI;” for C# or " import UnityEngine.UI;" for javascript

you can set the reference by using the type “Text” for the variable.
for example:

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class test : MonoBehaviour {

	void Awake(){
			
		Text name = GameObject.Find("Canvas/playerInformation/Name").GetComponent<Text>();
		name.text = "Bob";
	}
}

Here are more examples:
http://unity3d.com/learn/tutorials/modules/beginner/ui/ui-text