Object Reference

using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class TextHints : MonoBehaviour {
Text text;
public float timer = 0.0f;
// Use this for initialization
void Start () {
text = GetComponent();
}
// Update is called once per frame

	void Update () {
		if (text.enabled) {
			timer += Time.deltaTime;
		}
		if (timer >= 4) {
			text.enabled = false;
			timer = 0.0f;
		}
	}
	void ShowHint(string message){

	Text.text = message;
		if(!Text.enabled){
			Text.enabled = true;
	}
}

Here’s my code. I have errors on lines 24, 25, 26, saying I need an object reference. What is an object reference? I’ve looked up other solutions, but changing things to GameObjects doesn’t work, unfortunately.

Try this:

     text.text = message;
         if(!text.enabled){
             text.enabled = true;

“text” is your object reference. “Text” is a class.