Module 6 · In Studio · challenge 2 of 2 in this lesson
challenges/work/teleport_data.luau validates TeleportData into a match id or nil: a table with a matchId string of 1 to 64 characters, letters, digits and dashes only (so an empty string, 65 characters or "x; DROP" gives nil)
A test in Studio grades it and prints a pass code.
Open
Level 3, Professional
Challenge
Write the lobby's rules as pure functions in the learner file. Start from the m14-ship tag in the game repo. The solution is challenges/solutions/lobby-and-teleport.md.
- Start from
- The game at milestone m14 (download)
- Grade it
- In Studio, press Play, then run
game.ServerScriptService.RunGameTests:Invoke("lobby-and-teleport", "lobby-teleport-rules")in the server command bar. Copy the pass code from Output.
Done means
- challenges/work/teleport_data.luau validates TeleportData into a match id or nil: a table with a matchId string of 1 to 64 characters, letters, digits and dashes only (so an empty string, 65 characters or "x; DROP" gives nil)
- It splits a group into batches of at most 50 players
- It says which TeleportResult names should be retried
- challenges/lobby-and-teleport.luau prints TEST PASS for every check