Score won't work

I’m trying to make a game and my score won’t work. The int is showing that the score is 3. But the text still says zero here’s my code:

Score:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class Score : MonoBehaviour {
public int score;
public Text scoreTxt;

// Use this for initialization
void Start () {
	score = 0;
}

// Update is called once per frame
void Update () {
	scoreTxt.text = "Score: " + score;
}

}
Now CoinCollision:
using UnityEngine;
using System.Collections;

public class CoinCollision : Score {

public void init()
{
	scoreTxt.text = score.ToString ();
}
// Use this for initialization
void Start () {
	
}

// Update is called once per frame
void Update () {

}

void OnTriggerEnter(Collider Col) {
	if (Col.tag == "Player") {
		score = score + 1;
		Debug.Log ("+1");

	}
}

}
Any ideas please let me know as soon as possible.

It appears that the issue here is that the Update function in the base class (Score) isn’t getting called because it’s hidden by the Update function in the derived class(Coin Collision). Since the Update function in the derived class is empty anyway you should just be able to remove it. Doing that will unhide the base class Update function and it will be called every frame as you expect. The takeaway from this is that when you define a function in a derived class that already exists in the base class you’re basically replacing the base class function. It seems that you’re also defining a Start function in both classes, I expect that the base class start function is also not getting called.

Edit: From the looks of it you only have one coin right now but if you add more coins you are going to need to move the score handling to it’s own script, right now each coin basically has it’s own score instead of there being a single score that each coin increments.