IEnumerator _SoundOut(AudioSource AS) { GameObject.Find("Main Camera").GetComponent <AudioSource>().Play(); float passed = 0f; ParticleSystem[] PSs = AS.GetComponentsInChildren <ParticleSystem>(); for (int i = 0; i < PSs.Length; i++) { PSs[i].Stop(); } while (passed < 2f) { passed += Time.deltaTime; AS.volume = 1f - passed / 2f; yield return(null); } AS.volume = 0f; AS.Stop(); }