3D Text set text but doesnt update text on the screen

Hi ı use below code set Text of 3D Text it sets text but doesnt update on gamescreen

TextMesh textObject = GameObject.Find(“Canvas/ScoreBoard/Score”).GetComponent();
textObject.text = “test”;

I solved my problem . I added :

using UnityEngine.UI.Text;

and changed code to :

   Text textObject = GameObject.Find("Canvas/ScoreBoard/Score").GetComponent<Text>();
            textObject.text = "test";