void OnTriggerEnter(Collider col) { if (col.gameObject.tag == "Enemy") { uText.AddScore(); // access AddScore from UIText Destroy(gameObject); } }