Retention by design: quests, dailies, streaks, return reasons

Turn Beacon Yard's core loop into a habit players return to on Day 7 and Day 30 with data-driven daily and weekly quests, forgiving streaks, social return reasons and server analytics.

Lab lesson, about 75 minutes, 8 steps

By the end you can

  • Structure quests around objective, quantity and reward tied to Beacon Yard's real server gameplay hooks
  • Rotate three daily quests and one weekly quest on server UTC boundaries without clock exploits
  • Design a forgiving daily streak with a grace day so one missed visit does not cause churn
  • Measure quest completion, streak health and coin inflation using custom and economy analytics events

Before this: Game design for Roblox: loops, retention, fairness, Recurring revenue: subscriptions and a season pass, Social growth: invites, referrals, notifications and events

Step 1 of 8

Why players come back on Day 7

In Game design for Roblox: loops, retention, fairness you saw that Beacon Yard is almost all core loop and very little multi-day progression. Look at what a player's saved profile holds at m14-ship:

export type ProfileData = {
	coins: number,
	speedOwned: boolean,
	-- True once this profile has looked for a BeaconYard_v1 record, found
	-- or not. A failed read leaves it false, so the next session retries.
	legacyImported: boolean,
	-- The furthest onboarding funnel step logged for this player (m12).
	onboardingStep: number,
	-- The last 50 developer product purchase ids this profile was paid
	-- for (m14). The id is saved in the same write as the coins, so a
	-- receipt Roblox delivers again is recognised. See ReceiptRules.
	recentPurchaseIds: { string },

Five fields: coins, speedOwned, legacyImported, onboardingStep and recentPurchaseIds. Nothing tracks what the player finished today, what they are working toward this week, or how many days in a row they visited the yard.

Roblox's retention guide separates three horizons1. Day 1 reflects onboarding, the core loop and performance. Day 7 depends on progression and short-to-mid-term goals. Day 30 rests on the ending system: fresh content and social mechanics. Daily stipends from Recurring revenue: subscriptions and a season pass only reward clicking join; real retention systems reward playing the core loop in a slightly different way each visit.

Choose one

Looking at DataMigration.ProfileData at m14-ship, why does Beacon Yard struggle to hold Day 7 players once they own Speed?

Looking at DataMigration.ProfileData at m14-ship, why does Beacon Yard struggle to hold Day 7 players once they own Speed?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 2 of 8

Quest structure: objective, quantity, reward

Roblox's quest design guide breaks every quest into three parts: an objective (what action counts), a quantity (how many times) and a reward (the payout that makes the effort feel worthwhile)2. It separates achievements (one-time badges like FIRST_DRILL and DRONE_DOWN), quest chains (one step unlocking the next) and daily questsDaily questA short task with a modest reward that resets every 24 hours on a server-controlled UTC clock.Think of it as a fresh sticky note on the yard notice board each morning. (short 24-hour tasks sized for one play session).

Good dailies pull players across systems they already enjoy instead of inventing busywork. In Beacon Yard, four server services already know when key actions happen: CoinService (pads collected), CombatService (the drone brought down), CrawlerService (crawlers knocked out) and RoundService (drills survived). At m16-design-pass they announce those moments through one small module, GameEvents, so QuestService listens in one place and the services never need to know quests exist.

Server hooks feed the quest boardServer gameplay services fire GameEvents, which QuestService listens to; QuestService updates ProfileStore slots and sends snapshots to the client QuestGui.eventsavesyncGameEventscoin, crawler, drillQuestServiceprogress + UTC resetProfileStoreslots + streak stateQuestGuiprogress + Claim
Gameplay services report real server events; QuestService owns progress, rollovers and payouts.
Match the pairs

Match each Beacon Yard daily quest objective to the server service that already owns its truth.

Link to this step · This confused me

Step 3 of 8

Daily and weekly rotation without clock exploits

Two bugs ruin live quest boards. First, reading the client's local time lets a player move their phone clock forward a day to reset dailies on demand. Second, storing a random roll per server causes players who server-hop to see a brand-new set of dailies every minute.

The clean fix uses integer division on server UTC time: dayKey = math.floor(os.time() / 86400) for dailies and weekKey = math.floor(os.time() / 604800) for the weekly milestone. Feed dayKey as the seed to a deterministic selector, and every server in the world picks the exact same three distinct dailies for that UTC day with zero extra DataStore calls.

Two details a live team checks before launch. Unix time started on a Thursday (1970-01-01), so math.floor(os.time() / 604800) rolls the week over on Thursday 00:00 UTC. For a Monday reset, shift by four days: math.floor((os.time() - 4 * 86400) / 604800). And UTC midnight is mid-afternoon or evening in the Americas, so pick the reset hour for where most of your players live, not for where the server clock happens to be.

Run this cell to test deterministic three-daily selection across two UTC days and confirm no duplicates appear.

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

A player finishes a daily quest at 23:59:59 UTC (unix = 86399) and joins again two seconds later at 00:00:01 UTC (unix = 86401). What does this print?

local d1 = math.floor(86399 / 86400)
local d2 = math.floor(86401 / 86400)
print(d1, d2, d2 > d1)
A player finishes a daily quest at 23:59:59 UTC (unix = 86399) and joins again two seconds later at 00:00:01 UTC (unix = 86401). What does this print?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 4 of 8

Streaks that forgive instead of punish

Stored dataDailies and forgiving streaks is a cafe stamp card with a spare stamp for one missed day.
In the pictureIn Roblox
Today's stampOne UTC day key (os.time() // 86400) recorded in the server profile
Free drink on stamp sevenA weekly quest or day-seven streak milestone reward
One spare stamp per weekA grace window that preserves the streak after a single missed day on a 7-day cooldown

See the whole analogy cast

Treat a daily streak like a cafe stamp card that includes one spare punch per week. Visiting tomorrow adds a stamp, missing a busy Tuesday uses your grace dayGrace dayA forgiveness window that lets a player miss one calendar day without losing their login or play streak.Think of it as a spare punch on a coffee card so one busy Tuesday does not wipe out a two-week habit., and missing several days starts a fresh card without shaming the player.

Think of it as A cafe stamp card with a spare stamp for one missed day

Strict streaks backfire in live games. A player on Day 11 who misses one day for travel or homework opens the game, sees Day 1, feels their effort was erased, and closes the app for good. Adding a one-day grace window on a seven-day cooldown fixes that cliff:

  • gap == 0: same UTC day, do nothing (idempotent).
  • gap == 1: consecutive day, increment count.
  • gap == 2: missed one full day. If lastGraceDay == nil or today - lastGraceDay >= 7, increment count and set lastGraceDay = today. Otherwise reset count = 1.
  • gap >= 3: missed two or more days, reset count = 1.

Stored dataRemember: Dailies and forgiving streaks is a cafe stamp card with a spare stamp for one missed day.

Now think carefully about where the stamp card stops working before opening the breakdown below.

Where does it break?“A cafe stamp card with a spare stamp for one missed day” is a good picture of dailies and forgiving streaks. Where does it stop being true?

It breaks here. A stamp card does not care whether the coffee tastes good; quests and streaks that pay for logging in without fun turn play into a chore and collapse Day 30 retention once players tire of the routine.

The true model. Quests, dailies and forgiving streaks structure return reasons around actions the player already enjoys. Rollovers use server UTC timestamps, progress hooks fire from server gameplay services, and claims save atomically inside ProfileStore.

Predict the output

A player has count = 5, lastDay = 100 and lastGraceDay = 95 (cooldown is 7 days). They miss Day 101 and return on Day 102. What does this print?

local count, lastDay, lastGraceDay = 5, 100, 95
local today = 102
local gap = today - lastDay
local graceReady = (today - lastGraceDay) >= 7
local nextCount = if gap == 2 and graceReady then count + 1 else 1
print(gap, graceReady, nextCount)
A player has count = 5, lastDay = 100 and lastGraceDay = 95 (cooldown is 7 days). They miss Day 101 and return on Day 102. What does this print?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 5 of 8

Social return reasons and measuring every hook

Quests and streaks pull a solo player back. Friends pull them back harder. In Social growth: invites, referrals, notifications and events you saw invites, referrals, opt-in notifications and Experience Events. Pair those with your quest board: a weekly quest like "Survive 5 drills with at least one teammate" gives players a concrete reason to invite a friend, and a scheduled Scrap Rush event creates a shared calendar moment.

A social daily needs a solo fallback. A daily is sized for one session, and a player who logs in alone cannot finish "repair the beacon with another player". Beacon Yard's Teamwork quest started as a daily with exactly this flaw: the co-op levers only appear with two or more players. It now sits in the weekly pool ("Repair the beacon with another player", 2 repairs, 60 coins), so a player has the whole week to find a partner.

Every retention feature must be measured on two axes: does it lift D7 retention, and does it break the economy? Beacon Yard already wraps both analytics calls in Analytics.luau:

function Analytics.log(player: Player, eventName: string, value: number?)
	safely(function()
		AnalyticsService:LogCustomEvent(player, eventName, value)
	end)
function Analytics.coinSource(player: Player, amount: number, balance: number, transactionType: string, sku: string)
	safely(function()
		AnalyticsService:LogEconomyEvent(
			player,
			Enum.AnalyticsEconomyFlowType.Source,
			CURRENCY,
			amount,
			balance,
			transactionType,
			sku
		)
	end)

Log quest_completed and quest_claimed with Analytics.log(player, name, slot.reward, { slot.id }). A custom event carries one number plus up to three string custom fields, and Roblox's guide uses quest names as its own example and recommends fields over extra event names3. So the reward is the value and the quest id goes in CustomField01, which lets the Explore page break completion down by quest. The streak logs one event, streak_updated, with the new count as the value and the outcome (incremented, grace_used, reset) as a field. Log every quest or streak coin payout through Analytics.coinSource with distinct SKUs ("DailyQuest", "WeeklyQuest", "StreakBonus")4. Quests use the Gameplay transaction type; the StreakBonus is a scheduled daily reward, so it uses TimedReward. The streak bonus is small on purpose: 2 coins per streak day, capped at 7 days, so at most 14 coins. On the Economy page, check that quest coins stay a modest supplement (for example, 15 to 25 percent of normal drill income) rather than replacing active play.

Roblox Studio
Beacon Yard in Studio Play showing the Quest Board panel with three daily quests, one active Claim button, a weekly quest row, and a Day 4 streak pill with Grace Ready.

Select a numbered pin, or a row below, to read what it marks.

Beacon Yard's Quest Board in Play: three rotating dailies, one weekly milestone and a forgiving streak indicator.

Choose all that apply

Which practices keep Beacon Yard's quest board measurable and safe for the economy?

Which practices keep Beacon Yard's quest board measurable and safe for the economy?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 6 of 8

Build it: Beacon Yard's quest board and streak tracker

Now wire the design into Beacon Yard's m16-design-pass milestone. Store the player's quest board and streak inside DataMigration.ProfileData so ProfileStore's session:Reconcile() automatically fills defaults for existing players with older profiles.

  • src/server/DataMigration.luau
  • src/shared/data/quests.json
  • src/shared/Quests.luau
  • src/server/GameEvents.luau
  • src/shared/AnalyticsFields.luau
  • src/server/Analytics.luau
  • src/server/QuestService.luau
  • src/client/QuestGui.luau
  1. Extend ProfileData and DataMigration.template() with questDayKey: number, questWeekKey: number, dailySlots: { QuestSlot }, weeklySlot: QuestSlot? and streak: { count, lastDay?, lastGraceDay? }.

    You should see Existing profiles gain questDayKey = -1, questWeekKey = -1, empty dailySlots and streak = { count = 0 } through Reconcile without losing coins.

  2. Put the quest pool in src/shared/data/quests.json, then add src/shared/Quests.luau, the finished version of this lesson's level 3 challenge: utcDay, utcWeek, pickDailies, recordProgress, claimQuest and advanceStreak with a 7-day grace cooldown. It holds rules only, so the pool can change without touching code.

    You should see quests.json lists five dailies (PadRun, Survivor, Scrapper, DroneDown, Tinkerer) and two weeklies (YardWeek, survive 15 drills for 150 coins; Teamwork, repair the beacon with another player twice for 60 coins), each with id, label, kind, event, target and reward.

  3. Create src/server/GameEvents.luau, one signal that gameplay services fire. CoinService, CombatService, CrawlerService, CoopService, ShopService and UpgradeService fire it directly, and RoundService reaches it through DrillDirector.afterDrill for a survived drill.

    You should see GameEvents.fire(player, event) is called with coin, drill_survived, crawler_down, drone_down, purchase, repair and upgrade.

  4. Add src/shared/AnalyticsFields.luau, a pure build(fields) that turns a list of strings into the CustomField01 to CustomField03 dictionary, and give Analytics.log an optional fields argument that passes it to LogCustomEvent. Keep field values to a small fixed set (an outcome, a quest id), never a user id or a timestamp.

    You should see Analytics.log(player, name, value?, fields?) sends up to three string fields as CustomField01 to CustomField03, and AnalyticsFields.build drops empty strings and ignores any past the third.

  5. Create src/server/QuestService.luau. refresh draws the dailies with pickDailies(daily, day, 3) and the weekly with pickDailies(weekly, week, 1). It listens to GameEvents.fired, handles the ClaimQuest remote behind RemoteGuard, and logs quest_completed and quest_claimed with the quest id as a field, streak_updated with the outcome as a field, plus Analytics.coinSource with DailyQuest, WeeklyQuest (both Gameplay) or StreakBonus (TimedReward). visit advances the streak from the drill_survived game event, so only the first survived drill of a UTC day counts: a streak rewards playing, not logging in.

    You should see Joining on a new UTC day draws three distinct dailies; a new UTC week draws one weekly. The streak moves on the first drill survived each UTC day, not on join. A Claim pays once, and a growing streak pays a StreakBonus of 2 coins per day, capped at 7 days.

  6. Build src/client/QuestGui.luau to render the board from the Store and fire ClaimQuest with only the quest id when a finished row's button is clicked.

    You should see K (or D-pad left) opens QuestGui with the three dailies, the weekly, live progress bars and the streak counter with Grace Ready status.

Other ways pros do this

OptionWhat it isWhen pros pick itTrade-offs
Custom ProfileStore QuestService (Beacon Yard)Pure Luau rotation, progress and forgiving streak saved inside the player's existing ProfileStore record.You already use ProfileStore and want atomic coin-plus-claim saves with zero extra DataStore keys.You build and test the quest UI and rollover rules yourself.
Roblox Missions feature package (beta)Official Studio package from Creator Store (requires the Core feature package) with mission IDs, categories, tasks and rewards.Prototyping standard quests quickly on a fresh project without a custom profile schema.Marked beta in Roblox docs as of 2026-11-25; uses its own Core DataStore layer instead of your ProfileStore profile.
External LiveOps backend over HttpServiceQuests and schedules pulled from your own web API.Large multi-game studios running cross-experience campaigns and segmented live offers.Requires hosting, HTTP rate-limit handling, caching and offline fallbacks.
Choose one

Why should Beacon Yard save slot.claimed = true inside the same ProfileStore Data table where DataService.addCoins adds the reward?

Why should Beacon Yard save slot.claimed = true inside the same ProfileStore Data table where DataService.addCoins adds the reward?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 7 of 8

Challenges

Fix advanceStreak below so rejoining the same day does nothing, a one-day gap increments, and a two-day gap uses the grace window when at least 7 days have passed since lastGraceDay.

Luau
Ctrl Enter runs the cell. Checked by tests

Level 1, Apprentice

Challenge

Fix advanceStreak in the streak-fix cell so a single missed day invokes the forgiving grace window on a 7-day cooldown.

Start from
The game at milestone m14 (download)
Check it here
Run the code cell; the challenge completes when it passes. No Studio needed.

Done means

  • gap == 2 triggers grace_used when lastGraceDay is nil or today - lastGraceDay is at least 7
  • Using grace increments count and records lastGraceDay = today
  • All four assertions in streak-fix pass

Level 2, Builder

Challenge

Write a one-page Beacon Yard Quest & Streak Balance Table that adds daily variety without inflating the coin economy.

Start from
The game at milestone m14 (download)

Done means

  • Design a pool of six Beacon Yard daily quests and two weekly quests, each naming its objective, quantity, reward and server hook
  • Verify that the three dailies plus a full streak bonus pay at most 25% of a 10-minute player's normal drill income (about 119 of 475 coins)
  • Include at least one co-op or social quest that encourages playing with a teammate

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

Testing pure retention rules without waiting 24 hours

Before writing DataStore code, isolate UTC rollovers, deterministic rotation, claim guards and grace-day transitions into a pure Luau module so every edge case runs in milliseconds inside the Course Runner.

Level 3, Professional

Challenge

Start from m14-ship in the game repo and implement the pure quest rotation, claim and forgiving-streak rules in challenges/work/retention_rules.luau, then verify with game.ServerScriptService.RunGameTests:Invoke("retention-design", "retention-rules-lab").

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

Done means

  • challenges/work/retention_rules.luau computes UTC day and week keys accurately
  • pickDailies returns distinct deterministic quests that rotate across days and clamp to the pool size
  • recordProgress filters by event, ignores non-positive values and clamps at target; claimQuest pays once only
  • advanceStreak implements started, same_day, incremented, grace_used (7-day cooldown) and reset without mutating input
  • RunGameTests:Invoke("retention-design", "retention-rules-lab") passes all 15 checks

The Course Runner prints this code when the test passes.

Choose one

Two weeks after shipping the quest board, your Explore dashboard shows five dailies at 68 to 76% completion, and one daily ('Destroy 12 crawlers in one day') at 9% completion. What is the best fix?

Two weeks after shipping the quest board, your Explore dashboard shows five dailies at 68 to 76% completion, and one daily ('Destroy 12 crawlers in one day') at 9% completion. What is the best fix?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 8 of 8

Recap

Retiring the analogy

You no longer need “a cafe stamp card with a spare stamp for one missed day”. Quests, dailies and forgiving streaks structure return reasons around actions the player already enjoys. Rollovers use server UTC timestamps, progress hooks fire from server gameplay services, and claims save atomically inside ProfileStore.

Recap

  1. Structure every quest around objective, quantity and reward, wired strictly to authoritative server gameplay hooks.
  2. Drive daily and weekly resets from server UTC day and week keys with deterministic selection so client clock tricks and server hopping cannot farm extra resets.
  3. Include a one-day grace window on a cooldown so streaks build habits without punishing real-life schedules.
  4. Pair quests with social return reasons (co-op weeklies, invites, scheduled events), and give every social daily a solo fallback.
  5. Track quest_completed, quest_claimed and separate economy SKUs (DailyQuest, WeeklyQuest, StreakBonus) to protect both completion rates and economy balance.

Dailies and forgiving streaks is a cafe stamp card with a spare stamp for one missed day, until a stamp card does not care whether the coffee tastes good; quests and streaks that pay for logging in without fun turn play into a chore and collapse Day 30 retention once players tire of the routine.

Next The first five minutes: an FTUE that keeps players

Link to this step · This confused me