// Jimmy Vegas Unity Tutorials // This Script will collect your first gem using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class GemSilver : MonoBehaviour { public GameObject scoreBox; public AudioSource collectSound; void OnTriggerEnter() { scoreBox.GetComponent().text = "1000"; collectSound.Play(); Destroy(gameObject); } }