Module 5 · In Studio · challenge 3 of 3 in this lesson

challenges/work/audio_mix.luau exports bus(kind) and cueVolume(cue, busName, mix, master)

A test in Studio grades it and prints a pass code.

Open

Level 3, Professional

Challenge

Plan the mix before you build it: start from the m14-ship tag in the game repo to get challenges/work/audio_mix.luau and challenges/audio.luau, then write the bus rules in challenges/work/audio_mix.luau. The written solution is challenges/solutions/audio.md.

Start from
The game at milestone m14 (download)
Grade it
In Studio, press Play, then run game.ServerScriptService.RunGameTests:Invoke("audio", "audio-mix-buses") in the server command bar. Copy the pass code from Output.

Done means

  • challenges/work/audio_mix.luau exports bus(kind) and cueVolume(cue, busName, mix, master)
  • bus sorts buy, deny, toast and announce into "ui", and gameplay or unknown kinds into "sfx"
  • cueVolume multiplies the cue's own volume by its bus (defaulting to 1 if missing) and the master volume, and clamps the result between 0 and 1
  • challenges/audio.luau prints TEST PASS for every check

The Course Runner prints this code when the test passes.