void OnTriggerEnter(Collider theCollision) { if (theCollision.gameObject.tag == "obstacles") { genScript.plusScore(); } }