private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Projectile" && scored == false) { Goal.goalMet = true; Material mat = GetComponent <Renderer>().material; Color c = mat.color; c.a = 1; mat.color = c; scored = true; Basketball.GoalHit(); } }