How do I reference my timer text??

Hello! I am very new to Unity and C#. I’ve been getting a reference error in my console and I’m very confused on what to do. Here’s my code for the timer:

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

public class Timer : MonoBehaviour {

public Text timerText;
private float startTime;
private object timer;

// Use this for initialization
void Start () {
    startTime = Time.time;
}

// Update is called once per frame
void Update () {
    float t = Time.time - startTime;

    string minutes = ((int)t / 60).ToString();
    string seconds = (t % 60).ToString("f2");

    timer.text = minutes + ":" + seconds;
}

}

timer is a private variable that you never set in your code, so it’s probably null.
timer.text won’t compile because the class object does not have a text member.

Remove line 4.

Change line 16 to: timerText.text = minutes + “:” + seconds;

Make sure that you set your timerText member in the inspector when placing your script on a gameobject.