LiveOps: updates, events, feature flags, migrations

Run a Roblox game after launch. Restart servers safely, keep two game versions from corrupting saved data, migrate versioned profiles, flip feature flags with ConfigService, and plan events and an update cadence.

Concept lesson, about 75 minutes, 11 steps

By the end you can

  • Restart only outdated servers, with a delay, and announce it to players with ServerRestartScheduled
  • Explain why two versions of the game can write one DataStore key, and decide when old servers may stay up
  • Version a saved profile and migrate it with a chain of small functions that never destroy data
  • Switch a feature on or off without publishing, using ConfigService, and plan an update cadence and timed events

Before this: Publishing: versions, rollback, store page, DataStores: saving without losing a single coin

Step 1 of 11

Friday, 17:00, a breaking profile change

You decide to replace the boolean speedOwned with a numeric speedTier so players can buy two levels of speed instead of one. You publish. Players are in the game.

Some of those players are in servers that started on Thursday. Those servers still run the old code, which expects a boolean speedOwned and knows nothing about speedTier. Other players joined a new server a minute ago, which saves speedTier. Both versions can write the same key for the same player over the next hour.

That is a LiveOps problem. LiveOps is everything you do to a game after launch: updates, events, fixes, balance changes and the ops around them1. The hard part is not shipping a change. It is that old and new versions run side by side.

Choose one

You publish a new version at 17:00. A server started at 16:00 still has players. Which code does it run?

You publish a new version at 17:00. A server started at 16:00 still has players. Which code does it run?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 2 of 11

Restarting servers on purpose

In the Creator Hub, open the game, then Configurations, Server management, choose the place and press Restart Servers. A dialog offers two options2:

  • Restart only servers with outdated versions. Servers already on the newest version are left alone. Roblox recommends always choosing this unless your update flow does not depend on the place version.
  • Delay server restart, from 1 to 60 minutes. Players get time to finish and leave on their own; this is often called bleeding off.

After you restart, Roblox stops matchmaking into the servers marked for shutdown. Players can still reach them by invite or by joining a friend. When the time comes, each old server's players are sent together to a server on the new version. To shut a game down completely you must also revoke public access.

Server management for a private game with no running servers, so nothing can be restarted. Nothing was restarted.

Transcript
  1. 0:00 Creations, the experience menu: Restart Servers is one of the options.
  2. 0:04 Server management lists the one place, with no active servers because the experience is private.
  3. 0:08 Restart Servers stays disabled until a place with running servers is selected. Nothing was restarted.
  4. 0:12 Server Restart Status: no active or recent restarts.

A delayed restart fires DataModel.ServerRestartScheduled(restartTime, source, attributes) on the affected servers. source is DeveloperUpdate for your restarts and RobloxMaintenance when Roblox restarts for infrastructure reasons, and attributes carries any note you attached3. Use it to warn players and save their progress.

Match the pairs

Match each setting to what it does.

Link to this step · This confused me

Step 3 of 11

What a server does when it closes

When a server closes, game:BindToClose gives scripts a short window to finish work. The m06 version of Beacon Yard, which wrote its own data code, used it to save every profile and release its session lock. This lesson reads that code because it shows the moving parts plainly:

	game:BindToClose(function()
		local pending: { { userId: number, profile: Profile } } = {}
		for player, profile in profiles do
			table.insert(pending, {
				userId = player.UserId,
				profile = {
					coins = profile.coins,
					speedOwned = profile.speedOwned,
				},
			})
		end
		for _, entry in pending do
			saveUser(entry.userId, entry.profile, true)

Together with a delayed restart this is the safe path: warn players with ServerRestartScheduled, let them finish, and rely on the leave and close handlers to save. A crash can skip both, which is why the m06 session lock expired after 45 seconds instead of lasting forever.

From m10-memory the game no longer does this by hand. ProfileStore holds the session lock, autosaves every few minutes, and saves on EndSession and on shutdown, and a server that asks for a locked profile waits and then takes the lock over. The restart plan above stays the same: the library takes over the saving, not the warning.

Choose all that apply

Which of these save a player's profile in Beacon Yard's m06 data code when a server restarts?

Which of these save a player's profile in Beacon Yard's m06 data code when a server restarts?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 4 of 11

One key, two versions

Look at what the m06 save writes inside UpdateAsync. The SavedRecord is a fixed table of four fields (coins, speedOwned, sessionJob, sessionAt):

		dataStore:UpdateAsync(tostring(userId), function(previous: unknown): SavedRecord?
			-- A test sets this so the transform throws before any write.
			-- UpdateAsync then leaves the stored record untouched.
			if workspace:GetAttribute("TestDataStoreLoadError") == true then
				error("TestDataStoreLoadError")
			end
			local coins = 0
			local speedOwned = false
			if typeof(previous) == "table" then
				local record = previous :: StoredProfile
				local loadedCoins = record.coins
				if typeof(loadedCoins) == "number" and loadedCoins >= 0 and loadedCoins == loadedCoins then
					coins = math.floor(loadedCoins)
				end
				if typeof(record.speedOwned) == "boolean" then
					speedOwned = record.speedOwned
				end
				if lockHeld(record) then
					profile = { coins = coins, speedOwned = speedOwned }
					owned = false
					return nil
				end
			end
			profile = { coins = coins, speedOwned = speedOwned }
			owned = true
			return {
				coins = coins,
				speedOwned = speedOwned,
				sessionJob = game.JobId,
				sessionAt = os.time(),
			}
		end)

The DataStore is a bank vault in another city, and a player's record is one deposit box. Two branches can open the same box. Each puts back whatever it thinks the box should hold.

Think of it as A bank vault in another city

Stored dataRemember: A DataStore is a bank vault in another city.

On m06's hand-written saver, an old server keeps only the four fields it knows (coins, speedOwned, sessionJob, sessionAt) and drops anything else on save. From m10-memory onward, ProfileStore changes half of that story: session:Reconcile() only fills missing keys from the template and saves the whole table back, so simply adding a new optional field (like shieldOwned) is safe across versions while old servers stay up. What still breaks every store, including ProfileStore, is renaming a field or changing a field's type or meaning (such as changing speedOwned from a boolean to a speedTier number): old servers look for the old key, see it missing or the wrong type, and write a reset or broken value back. Last write wins. Module 15's Incidents: severity, kill switches and post-mortems spells out the full rollback table for ProfileStore.

A change to a number in code, such as COIN_VALUE from 5 to 6, is milder: both versions still write a number into coins, so the stored shape is the same. The danger on ProfileStore is a breaking shape change: a renamed field, a moved field, or a changed type (and on a fixed-table saver like m06, even an added field).

Match the pairs

Match each change to how risky it is for old servers on ProfileStore.

Link to this step · This confused me

Step 5 of 11

Where the vault picture breaks

Where does it break?“A bank vault in another city” is a good picture of a datastore. Where does it stop being true?

It breaks here. The vault keeps only the last write for a key, so two servers writing the same key can silently undo each other.

The true model. A DataStore is a remote key-value store with request budgets. Calls are slow and can throw, so code wraps them, retries carefully and uses UpdateAsync or a session lock when more than one server might write.

The vault keeps only the last write, so the safe habit is not "lock the box". It is to make every version agree on the box's contents. That is a design rule for the stored record: old code must be able to read and preserve what new code writes, and new code must accept every old record.

Choose one

Which loading strategy lets an old server survive a new field?

Which loading strategy lets an old server survive a new field?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 6 of 11

Versioned profiles and migrations

Give every record a version number and keep a chain of small migration functions, one per step. When a profile loads, run it forward from its version to the current one4. Before pressing Run, predict what migrate prints for an unversioned v1 profile and for a v3 profile from a newer server.

Luau
Ctrl Enter runs the cell. Checked against the expected output

Three rules keep migrations safe:

  1. Add, do not rewrite. A new field gets a default. Renames are two releases: write both, then drop the old one.
  2. Refuse the future. A record with a newer version than your code must not be loaded and saved as if it were yours. Beacon Yard's save already refuses to overwrite a record locked by another server; a version number adds the same caution for the shape of the record.
  3. Keep the key. Never move to a new data store name to change the shape. Renaming starts an empty store.

Roblox also keeps versioned backups of each key. They expire 30 days after a newer write overwrites them, and the latest version never expires5. That is your safety net for a bad migration, so do not wait a month to notice one.

Put in order

Order the rollout of a breaking profile shape change (such as renaming speedOwned to speedTier).

  1. Publish a compatible release that reads both shapes and keeps the new field, while still writing the old shape
  2. Restart outdated servers and check that none still runs the old code
  3. Switch on writing the new shape, with a config flag
  4. In a later release, remove the old-shape code
  5. Write the migration and a test: a version 1 record loads as version 2 with the migrated value

Link to this step · This confused me

Step 7 of 11

Feature flags: change behaviour without publishing

Restarting is slow and disruptive. For many changes, you want to alter behaviour while servers keep running: turn a feature on for a weekend, raise a drop rate, or switch a broken feature off in a hurry. That is a feature flag: a value your code reads that you can change without publishing.

Roblox's built-in tool is experience configs. Instead of hard-coding a constant, you read a value from ConfigService6:

luau
local ConfigService = game:GetService("ConfigService")
 
local ok, snapshot = pcall(function()
	return ConfigService:GetConfigAsync()
end)
 
local doubleCoins = ok and snapshot:GetValue("double_coins") == true
 
if ok then
	snapshot.UpdateAvailable:Connect(function()
		snapshot:Refresh()
	end)
end

How it works, from the docs6:

  • ConfigService is server-only. Calling its methods from a client script throws an error.
  • A config is a key with a string, number, boolean or JSON value. It starts staged, visible only in Studio test sessions. Publish now reaches players in roughly 15 seconds to a minute; Publish over 15 min rolls out gradually.
  • A snapshot is a point in time. It does not update by itself: connect UpdateAvailable and call Refresh.
  • GetConfigAsync can throw the first time if it never loaded, so wrap it in pcall and keep a default.
  • Use ConfigService:GetConfigAsync() for global values shared by everyone on the server. Conditional configs (by country, language, new or returning, and similar attributes) and Experiments (14 to 60 days) require ConfigService:GetConfigForPlayerAsync(player) instead, because GetConfigAsync() does not evaluate per-player targeting or enroll players in experiments7.
  • A config does nothing until your code reads it.

Before running the cell below, predict what coinValue prints for an empty table, for double_coins = true, and for nil (a failed config load).

Luau
Ctrl Enter runs the cell. Checked against the expected output

Note the shape: a pure function with a safe default. When the config cannot load, the game behaves as normal, not as an event.

Choose one

ConfigService cannot be reached when a new server starts. What should coinValue return?

ConfigService cannot be reached when a new server starts. What should coinValue return?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 8 of 11

Events and an update cadence

Creator Hub lets you schedule events for your game, with a thumbnail, a title, start and end times, and a place; you can have up to 10 ongoing or upcoming events at once. Players can find them on the game page, and you can announce updates to opted-in players with a notification8.

Pair an event with a flag. Schedule "Double Coin Weekend" in the Creator Hub so players see it, and use a config boolean so the weekend starts and ends without a publish.

A content cadence is the regular release of small updates: items, maps, quests, pets, variants1. Roblox's guidance is to build content from systems you already have, keep the effort under three weeks per release, and settle into a routine so players come back to see what is new. New systems turn a cadence release into an expansion, which is not sustainable on a short schedule.

Studios put both events (temporary activities) and content updates (permanent additions) onto one 12-week calendar, naming each beat's target KPI, guardrail, communication channel and QA gate in advance9. Start from Beacon Yard's shared sheet: Download the 12-week LiveOps calendar template (CSV). Notice that its experiment spans two full quiet weeks (meeting Roblox's 14-day minimum) with no overlapping coin rush. In Module 15, The live-ops calendar: seasons, events and the content pipeline builds the full season pipeline around this calendar and wires a config-driven Scrap Rush schedule with server clamp rules.

Other ways pros do this

OptionWhat it isWhen pros pick itTrade-offs
Experience configs (ConfigService)Official key-value flags with staging, gradual rollout, targeting and experiments.Most flags: event switches, tuning numbers, kill switches.Needs a snapshot refresh in code; each key does nothing until you read it.
Attributes set by a server scriptA script sets workspace attributes on a timer or date check.A simple fixed schedule baked into the code.Changing the schedule means publishing and restarting.
A config DataStore plus MessagingServiceYour own flags in a DataStore, with a message telling servers to re-read them.Studios that built this before ConfigService existed.You maintain the tooling, budgets and rollbacks yourself.
Publish and restartShip the change in a new version.Anything that is not a simple value or a toggle, such as new content or code fixes.Slow, and old servers linger without a restart.
Match the pairs

Match each change to the best tool.

Link to this step · This confused me

Step 9 of 11

A release you can roll back

At m14-ship, Beacon Yard wires its real event flag (scrap_rush and scrap_rush_multiplier) in src/server/FlagService.luau and pairs it with Jest-Lua tests for both FlagService and DataMigration (the legacy importer added in m10-memory).

Build along

m13-art-pass to m14-ship

  • src/server/FlagService.luau
  • src/server/CoinService.luau
  • src/shared/Config.luau
  • unit/specs/FlagService.spec.luau
  • unit/specs/DataMigration.spec.luau
  1. Build test.project.json on m14-ship, open it in Studio Edit mode, and run unit/run.server.luau in the command bar. Read the DataMigration.spec pass lines alongside src/server/DataMigration.luau to verify how old records upgrade with defaults and guards.

    You should see DataMigration.spec.luau passes in Edit mode, proving legacy BeaconYard_v1 records import safely once and never overwrite newer coins.

  2. In the same Jest-Lua run, verify the FlagService.spec pass lines, then open src/server/FlagService.luau and confirm that FlagService.start loads ConfigService:GetConfigAsync() in its own thread so boot never blocks for 30 seconds in an unpublished place. In Play mode, run event_flag_start_fast via RunGameTests:Invoke() to prove boot stayed under a second.

    You should see FlagService.spec.luau passes, proving effectiveMultiplier returns 1 when scrap_rush is off and clamps scrap_rush_multiplier between 1 and Config.EVENT_MAX_MULTIPLIER when on.

  3. Create the scrap_rush (boolean) and scrap_rush_multiplier (number) configs in the Creator Hub, leave them staged, and test in Studio.

    You should see Studio Play shows boosted coins when scrap_rush is staged true. The playtest suite and FlagService.spec.luau still pass with the flag off.

  4. Write the restart plan for the release: which option, which delay, and what players see.

    You should see A restart note exists in your release notes: outdated servers only, delayed 10 minutes, with a ServerRestartScheduled message in chat.

Choose one

You ship a release that renames a saved profile field and adds a Double Coin flag. Which action cannot wait for servers to empty?

You ship a release that renames a saved profile field and adds a Double Coin flag. Which action cannot wait for servers to empty?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 10 of 11

Challenges

Level 1, Apprentice

Challenge

Classify these for a ProfileStore game: COIN_VALUE to 6, a new optional shieldOwned field, renaming speedOwned to speedTier (number), changing DRONE_SPEED, and renaming the data store.

Start from
The game at milestone m06 (download)

Done means

  • Five changes classified as value change, additive ProfileStore field, or breaking shape change
  • For each breaking shape change, the rollout and restart option you would choose

Meet the criteria above, then record your own result. No test grades this check.

Level 2, Builder

Challenge

Write the Double Coin flag as a pure function with tests.

Start from
The game at milestone m06 (download)

Done means

  • A coinValue function that defaults to the normal value when the flag is missing or the config failed
  • A test for each of: flag true, flag false, no config
  • No change to Config.COIN_VALUE

Meet the criteria above, then record your own result. No test grades this check.

Choose one

An old server loads a profile whose version is 3, but its own code only knows version 2. What should it do?

An old server loads a profile whose version is 3, but its own code only knows version 2. What should it do?

Press 1 to 4 to choose, Enter to check.

Level 3, Professional

Challenge

Decide when old servers can stay up for m06's fixed-table saver in challenges/live_ops_work.luau (where any added or dropped key breaks the four-field copy). Grade the change on m14-ship: press Play and run this in the server command bar.

luau
game.ServerScriptService.RunGameTests:Invoke("live-ops")
Start from
The game at milestone m06 (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 run game.ServerScriptService.RunGameTests:Invoke("live-ops") in the server command bar. Copy the pass code from Output.

Done means

  • safeToLeaveOldServers is true only when the old and new field sets are the same set of names
  • Order does not matter, an added or dropped field is false, and an empty list is false
  • challenges/live-ops.luau prints TEST PASS for all six cases

The Course Runner prints this code when the test passes.

Link to this step · This confused me

Step 11 of 11

Recap

Recap

  1. Publishing does not move running servers. Restart only outdated servers, with a delay, and warn players with ServerRestartScheduled.
  2. ProfileStore preserves unknown keys when you add a new optional field, while renames and type changes break old servers on every store. Roll out breaking shape changes in two phases: a compatible release, a restart of old servers, then the new writes. Version profiles, migrate forward, refuse the future and never rename the store.
  3. Use ConfigService flags with safe defaults for toggles and tuning; keep a cadence of small releases and a rollback plan.

A DataStore is a bank vault in another city, until the vault keeps only the last write for a key, so two servers writing the same key can silently undo each other.

Next Exploiters in production: detect, log, ban, appeal

Link to this step · This confused me