Need help with making UI update with player score

Hello. I am very new to c# and i am trying to make it so when my ball goes through a gate, it updates my text UI with the players score. I’ve gotten to the point where it updates in the console with numbers going up by 1 each time. Now I’m stuck on how i can get it to update an UI text element. Please help I have no clue how the UI works in Unity.
This is the code i have so far that updates the score in console: using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class playerscore : MonoBehaviour {

private int pscore = 0;
// Use this for initialization
void Start () {
	print(pscore);
}

// Update is called once per frame
void Update () {
	
}
void OnTriggerEnter(Collider col){
	print(pscore ++);
}

}

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

public class playerscore : MonoBehaviour {

 private int pscore = 0;
public Text scoreText; // Assign this to your text UI
 // Use this for initialization
 void Start () {
     print(pscore);
 }
 
 // Update is called once per frame
 void Update () {
     scoreText.text = pscore.ToString();
 }
 void OnTriggerEnter(Collider col){
     print(pscore ++);

pscore += 1;
 }
}

Let me know if any problems occur.

thank you so much my guy.