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

challenges/work/rewind_buffer.luau keeps one second of samples and blends between them

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

Open

Level 3, Professional

Challenge

Write the rewind buffer in the game repo's challenges/work/rewind_buffer.luau, then run the server-authority challenge through the Course Runner.

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

Done means

  • challenges/work/rewind_buffer.luau keeps one second of samples and blends between them
  • rewindTime clamps to MAX_REWIND, refuses future times and treats NaN, infinity and non-numbers as now
  • rayHitsSphere tests the whole swing segment, not just its end
  • The server-authority challenge prints TEST PASS for all nineteen checks, including lag_rewound_hits

The Course Runner prints this code when the test passes.