public override void ActivatePowerUp(string name, Transform origin) { base.ActivatePowerUp(name, origin); var bounce = origin.GetComponent <Bounce>(); Competitor competitor = origin.GetComponent <Competitor>(); bounce.enabled = false; if (origin.childCount > 1) { origin = origin.GetChild(1); if (origin.childCount > 0) { origin = origin.GetChild(0); origin.GetComponent <MeshRenderer>().material = ballOfSteelMaterial; } } competitor.BallOfSteel(origin, duration); }