void OnTriggerEnter(Collider collider) { if (collider.tag == "CubeGrid") { DeactivateCube(); spawner.IncreaseMissCount(); GameObject explosion = (GameObject)Instantiate(Resources.Load <GameObject>("Prefabs/Explosion")); explosion.transform.position = this.transform.position; // Force of the explosion cart.rigidbody.AddForce(-25000, 0, 0); cart.GetComponent <GameStats>().AddScore(-100); GameObject.Destroy(this.gameObject); } }