How to disable box collider for a couple seconds (871689)

currently everytime the player goes over the object the score keeps going up as they touch the collider for a couple seconds but I just want them to touch it once and get 1 point added to score not multiple. Then move onto the next platform and get another point added.

public class GroundTile : MonoBehaviour
{

    GroundSpawner groundSpawner;

    // Start is called before the first frame update
    void Start()
    {
        groundSpawner = GameObject.FindObjectOfType<GroundSpawner>();
    }

    private void OnTriggerEnter(Collider other)
    {
       
            ScoreManager.instance.AddPoint();
         
    
       
    }

    private void OnTriggerExit(Collider other)
    {
        groundSpawner.SpawnTile();
        Destroy(gameObject, 2);

    }

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

    }
}

Use a bool that gets switched the first time they enter and exit

(and use the Scripting forum next time)

You can keep track of colliders your object already touched. (using List, HashSet, anything)

You can disable component. Collider.enabled = false

You can also destroy the object with collider when it is touched.