public bool safeToBreakPlatform = false; // set to true in Game Manager.. private void OnCollisionEnter(Collision collision) { if (collision.transform.gameObject.layer == 12 && slaming && safeToBreakPlatform) // also only spawn when next level is generated. { Platform platform = collision.transform.parent.GetComponent <Platform>(); platform.ShatterPlatform(); safeToBreakPlatform = false; // Reward Player for slamming pointSystem.AddDestroyedPlatformPoints(); } }