Unity Noob (me) can't do something basic

Hi, I’ve been trying to make a textmesh pro text update to the current value of “coins” stored in the GameController but I keep getting: “NullReferenceException: Object reference not set to an instance of an object” in line 22 (coinsText.SetText("Coins: " + coinsScript.coins); ). How can I fix this so it updates properly?

This is my code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class UpdateCoins : MonoBehaviour
{
    public GameObject gameConroller;
    private CoinControl coinsScript;
    public TextMeshProUGUI coinsText;
    // Start is called before the first frame update
    void Start()
    {
        gameConroller = GameObject.Find("GameController");
        coinsScript = gameConroller.GetComponent<CoinControl>();
        coinsText = GetComponent<TextMeshProUGUI>();
    }
    // Update is called once per frame
    void Update()
    {
        Debug.Log(coinsText);
        coinsText.SetText("Coins: " + coinsScript.coins);
    }
}

There is probably a line of code mentioned in that error message as well.

Line 22

the error might be with the way you spell GameCon(t)roller.

Using a find function for such trivial things is just a bad habit. Connect game objects and scripts with drag and drop in Inspector. You can also think about something useful like GameManager in a singleton pattern.

What you want to do you have described here. I suggest starting from Unit 1 for an extra essential guide.