Please Help! Can you edit this script?,How to: If the text is 10 then change the scene to 1??

How to make this code correct? Can you edit? Im Unity noob.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class UnityCollectItems : MonoBehaviour
{
public int sceneNum;
public GameObject scoreText;
public int thescore;
public AudioSource collectSound;

void OnTriggerEnter(Collider other)
{
    collectSound.Play();
    theScore += 1;
    scoretext.GetComponent<Text>().text = "SCORE: " + theScore;
    Destroy(GameObject);
}
public void IfScoreText()

{
if (scoretext) 10 then:
SceneManager.LoadScene(sceneNum);
}

}
,Please can you edit this c# script to correct??

`using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class UnityCollectItems : MonoBehaviour
{
public int sceneNum;
public GameObject scoreText;
public int thescore;
public AudioSource collectSound;

void OnTriggerEnter(Collider other)
{
    collectSound.Play();
    theScore += 1;
    scoretext.GetComponent<Text>().text = "SCORE: " + theScore;
    Destroy(GameObject);
}
public void IfScoreText()

{
if (scoretext) 10 then:
SceneManager.LoadScene(sceneNum);
}

}`

You wouldnt test on the string you would test on the integer score value i.e.


if (theScore >= 10) 
{
   // Do scene loading here i.e. 
   SceneManager.LoadScene(sceneNum);
}

Learn about operators here, I suggest just reading all of the C# documentation. Especially the basic language documentation.