how to turn float score to text object

Getting a error: error CS0029: Cannot implicitly convert type ‘string’ to ‘TMPro.TextMeshProUGUI’
How can I score update by scoreValue

public static float scoreValue;

    public TextMeshProUGUI score;

    // Start is called before the first frame update
    void Start()
    {
        score = GetComponent<TextMeshProUGUI>();
    }

    // Update is called once per frame
    void Update()
    {
        scoreValue += Time.deltaTime;
        Debug.Log(scoreValue);
        score = scoreValue.ToString();
    }

I wouldn’t assign score over and over in update, but besides that…

score.text = scoreValue.ToString();

why my textcomponent disspears from public TextMeshProUGUI score; when I start the scene.

Is your script above on the same GameObject that has your TextMeshProUGUI script on it? If not and you’re doing drag and drop, remove the line in start.

Aah ok, but I don't understand my text is not going up, in de debug.log it is.

Solved it