Module 10 · In Studio · challenge 3 of 3 in this lesson
challenges/debugging_branch.luau pays the coin value at 12 studs or closer
A test in Studio grades it and prints a pass code.
Open
Level 3, Professional
Challenge
The learner file pays 0 up close and 10 far away. Use a breakpoint to see which branch runs, then fix it. Run it from the server during Play:
game.ServerScriptService.RunGameTests:Invoke("debugging")
- Start from
- The game at milestone m04 (download)
- Grade it
- To grade work from an earlier milestone, apply your challenge changes to a checkout based on
m14-ship, which includes the Course Runner. In Studio, press Play, then rungame.ServerScriptService.RunGameTests:Invoke("debugging")in the server command bar. Copy the pass code from Output.
Done means
- challenges/debugging_branch.luau pays the coin value at 12 studs or closer
- It pays 0 past 12 studs and never doubles
- challenges/debugging.luau prints TEST PASS for all five cases