Don't update UI text

Hello:
I’m trying make a marker for the score of my game, but my UI Text don’t update the number.

This is my Code:

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

public class Score : MonoBehaviour {
    Text scoreRecord;
    // Use this for initialization
    void Start () {

        scoreRecord = GetComponent<Text>();
    }

    // Update is called once per frame
    void Update () {
        scoreRecord.text = "3";
    }
}

Always the ui text print a zero by default.

That’s incorrect. The script is fine as it is and should not be changed, but you need to attach it to the appropriate GameObject.

–Eric