UI Text not displaying public int but will display private int

I am trying to display the value of a public int that I can set in the inspector but it won’t show, if I use a private int instead it’s all fine. If I make a private int and set it equal to my public int that doesn’t work either. The really odd thing is that it DOES change the text in the inspector, just not the game view! What is going on?!

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

public class PortalController : MonoBehaviour {

    public Text scoreText;

    public int totalPortalPoints;
    private int portalPoints;

    void Start()
    {
        portalPoints = totalPortalPoints;
        Debug.Log("Portal points at: " + portalPoints.ToString());
        scoreText.text = "Portal points at: " + portalPoints.ToString();
    }

	void OnTriggerEnter(Collider other)
    {
        GameObject creep = other.gameObject;
        CreepController cc = (CreepController)creep.GetComponent("CreepController");
        portalPoints -= cc.portalPoints;
        Debug.Log(portalPoints); 
        Destroy(creep);
    }
}

I fixed the issue by putting the code to update the text in it’s own method. I have no idea why this works, just glad it does.