2 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Core scripts

The core game loop in Roblox Battle Royale is generally handled by two scripts, specifically ServerScriptService/Server on the server and StarterPlayer/StarterPlayerScripts/Client on the client.

Initial setup

The ReplicatedFirst/InitialSetup script configures a few engine-level systems — built-in UI, chat, etc. — and ensures that the client loads the assets referenced in ReplicatedFirst/Configurations/AssetPreloads before proceeding.

Game stages

The initialization and updating of specific systems is done differently depending on the current stage of the game. Most of these cases are handled by ServerScriptService/Core/GameStageHandler on the server and ReplicatedStorage/Core/StageManager on the client. When a stage is requested, a module of the same name is required and various setup functions called on it. If there is already a module handling the current stage, shutdown functions are called on it prior to the new stage handler being initialized.

Places/server roles

Within ReplicatedFirst/Configurations/MainConfiguration, different gameplay modes are organized into lists of stages to be executed.

local _roleStages = {
	Lobby = {"Lobby"},
	Queue = {"Queue"},
	Gameplay = {"Waiting", "Gameplay", "EndGame"},
}

There are 3 different roles that a place can have: