Battle Royale tutorial uses wrong function name in example

Is education.roblox.com part of the developer hub? Guess I’m about to find out.

On the Managing Players page of the Battle Royale tutorial, under the “Connect Modules and Test” header, the second code sample shows a function called prepareGame. This is supposed to be preparePlayers, and this is evident when reviewing other code samples on the other pages.

local moduleScripts = ServerStorage:WaitForChild("ModuleScripts")
local playerManager = require(moduleScripts:WaitForChild("PlayerManager"))
 
-- Local Functions
 
-- Module Functions
function MatchManager.prepareGame() --< this is wrong
	playerManager.sendPlayersToMatch()
end

This should be changed to the following:

local moduleScripts = ServerStorage:WaitForChild("ModuleScripts")
local playerManager = require(moduleScripts:WaitForChild("PlayerManager"))
 
-- Local Functions
 
-- Module Functions
function MatchManager.preparePlayers()
	playerManager.sendPlayersToMatch()
end

The problem persists in the example at the end of the “Connect Modules and Test” section.

Should be changed to this:

local MatchManager = {}
 
-- Services
local ServerStorage = game:GetService("ServerStorage")
 
-- Module Scripts
local moduleScripts = ServerStorage:WaitForChild("ModuleScripts")
local playerManager = require(moduleScripts:WaitForChild("PlayerManager"))
 
function MatchManager.preparePlayers()
	playerManager.sendPlayersToMatch()
end
 
return MatchManager
4 Likes