Designing for groups: co-op, competition, trading

Design for groups on Roblox with Beacon Yard as the case study, covering co-play as a discovery signal, roles and shared goals, a two-lever beacon repair, capped crew goals, competition and why trading should wait.

Concept lesson, about 75 minutes, 10 steps

By the end you can

  • Explain why Roblox rewards games that friends play together, using the documented discovery signals
  • Tell the four shapes of group play apart and pick the one a feature needs
  • Design a co-op objective that needs two players and cannot be finished by one: the two-lever beacon repair
  • Judge whether a game is ready for trading, and name the exploits and policies that come with it

Before this: Social growth: invites, referrals, notifications and events, Game design for Roblox: loops, retention, fairness

Step 1 of 10

Two players, one drill, no reason to need each other

Here is the code that pays the survival bonus at the end of a drill, as it ships at m14-ship:

local function awardSurvival()
	for _, player in Players:GetPlayers() do
		local character = player.Character
		local humanoid: Humanoid? = nil
		if character then
			humanoid = character:FindFirstChildOfClass("Humanoid")
		end
		if humanoid and humanoid.Health > 0 then
			local balance = DataService.addCoins(player, Config.SURVIVAL_BONUS)
			Analytics.coinSource(
				player,
				Config.SURVIVAL_BONUS,
				balance,
				Enum.AnalyticsEconomyTransactionType.Gameplay.Name,
				"SurvivalBonus"
			)
			Analytics.onboarding(player, "SurvivedDrill")
			BadgeAwards.award(player, "FIRST_DRILL")

It loops over every player and pays each one who is still alive. Starting a drill is just as solitary: the beacon prompt calls requestStart, which ignores who pressed it and checks only if busy or phase ~= "Idle". Any one player can start the drill, and every player is paid alone.

So with two players in the yard, the drone dies faster (two wrenches at 34 damage each) and that is all. No rule in the server needs a second person. A designer would say the game is multiplayer (several people share a space) but not cooperative (people need each other to succeed).

Choose one

A second player joins your yard at m14-ship. Which rule in RoundService treats the two of you as a team?

A second player joins your yard at m14-ship. Which rule in RoundService treats the two of you as a team?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 2 of 10

Why Roblox rewards playing together

Roblox's guide to designing for the platform describes players "often hopping from one game to another with friends", and says other players act as "evergreen sources of content for each other", so single-player games "often find it harder to build and retain an audience"1. It even suggests making invitations part of the game "through mechanics such as parties and trading".

The discovery documentation puts a number on the idea. Among the signals it lists as important for Home recommendations is intentional co-play days per user: "the average number of unique days that users come back to play your game with friends, including co-play days through join, invites, or private servers"2. Two details are easy to miss. The signals are averages per user, not totals. And users who first arrive through friends, ads, search or any source other than Recommended for You can speed up your game's consideration, but their engagement is not counted in the ranking stage. Friends get people in the door; what keeps them is still your game.

Choose one

Which design change most directly moves the intentional co-play days signal?

Which design change most directly moves the intentional co-play days signal?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 3 of 10

Four shapes of group play

Group features come in four shapes. Each answers a different question for the player.

ShapeThe player asksBeacon Yard exampleWhat it costs you
Co-op with roles"Can I do something my friend cannot?"One player stuns the drone, the other repairs the beaconFairness when one player leaves; solo play
Shared goal"Are we getting somewhere together?"A crew goal: 500 drone hits this weekFree riders and players who carry everyone
Competition"Am I better than them?"The best-match leaderboard from the lobbyMatchmaking, pay-to-win pressure, toxicity
Exchange"Can I give or swap something?"Not in the game yetDupes, scams, real-money trading, policy
Server sideA co-op objective that needs two players is a two-person saw, with a handle at each end.
In the pictureIn Roblox
A handle at each end of the bladeTwo levers about 40 studs apart, too far for one player
One person cannot use the saw at allavailable hides the repair when fewer than 2 players are in the server
Pulling in rhythmTwo pulls by different userIds within WINDOW_SECONDS (1.5 s), measured by the server
The cutisRepaired returns true and each puller gets the crew bonus once

See the whole analogy cast

A co-op objective is like a two-person saw, the long blade with a handle at each end. One person cannot use it at all. Two people who pull in rhythm cut faster than either could alone, and each feels the other through the blade.

Think of it as A two-person saw, with a handle at each end

Match the pairs

Match each feature idea to the shape of group play it belongs to.

Link to this step · This confused me

Step 4 of 10

Design it: the two-lever beacon repair

Here is the feature. Every drill rattles the beacon, and between drills it flickers. Two levers stand on opposite sides of the beacon ring, 40 studs apart, too far for one player to reach both. When two players pull them within 1.5 seconds of each other, the beacon is repaired and both get a crew bonus.

Write the rules before the code. Each one closes a hole a player would find:

  1. Shown only with two or more players. A solo player should never see a job they cannot finish.
  2. Two different players. One player cannot hold both levers; pulling one lets go of the other.
  3. Both still in the server. A player who pulls and leaves must not finish the job for the one who stayed.
  4. Within the window. The two pulls are at most 1.5 seconds apart, and the pair is fresh: the later pull is at most 1.5 seconds old.
  5. A bonus, never a gate. The drill still starts without a repair. Nobody is stuck because a teammate is away from the keyboard.

The server decides every rule with workspace:GetServerTimeNow(), never a time the client reports. This cell has the check with one rule missing. Run it and read which test fails.

Luau
Ctrl Enter runs the cell. Checked by tests

Level 1, Apprentice

Challenge

Add the missing rule to isRepaired in the lever-rules cell so one player can never repair the beacon alone.

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

  • isRepaired returns false when the same userId holds both levers
  • The two-player, window, stale and departed-player cases still behave as before
  • All five tests in lever-rules pass
Predict the output

With the finished rules, player 101 pulls the left lever at 20.0 and player 202 pulls the right lever at 21.2. The server checks at 22.9. What does isRepaired return?

local WINDOW = 1.5
local apart = math.abs(20.0 - 21.2)
local age = 22.9 - math.max(20.0, 21.2)
print(apart <= WINDOW, age <= WINDOW)
With the finished rules, player 101 pulls the left lever at 20.0 and player 202 pulls the right lever at 21.2. The server checks at 22.9. What does isRepaired return?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 5 of 10

Where the two-person saw breaks

Server sideRemember: A co-op objective that needs two players is a two-person saw, with a handle at each end.

The saw picture gets the core right: one person cannot do it, two in rhythm can. Now look at what a real yard adds. The two players are not side by side; each is on their own device with their own lag, so "at the same time" can only mean "within a window the server measured". Either player can leave mid-pull. In a two-player server, one idle player can stop the other from ever finishing. With three players, a third could keep pulling one lever to replace a partner's pull and take the bonus, unless a held lever refuses a second player.

Where does it break?“A two-person saw, with a handle at each end” is a good picture of a co-op objective that needs two players. Where does it stop being true?

It breaks here. The two sawyers are side by side and can see each other. Online players are on separate devices with their own lag, either can leave mid-pull, and a third player can stand on a handle and never pull.

The true model. The server decides with its own clock: a window absorbs lag, a presence check ignores a player who left, the same userId on both levers never counts, and the objective is a bonus between drills, so an idle or griefing player can cost the others a reward but never their session.

Each of those is a design decision, not a bug to patch later. The window absorbs lag. The presence check stops a departed player from finishing the job. Making the repair a bonus, not a gate, takes the power away from the hostage taker: the drill goes on without them.

Choose all that apply

Which of these are real ways a two-player objective goes wrong online, that the rules above guard against?

Which of these are real ways a two-player objective goes wrong online, that the rules above guard against?

Press 1 to 5 to choose, Enter to check.

Link to this step · This confused me

Step 6 of 10

Crews and shared goals

A shared goal gives a group a reason to come back together: "our crew downed 500 drones this week". Two problems come with it. Free riders join a crew and do nothing. Carries do everything, so the goal finishes in an hour and the others never feel part of it. The common fix is a cap: each player counts for at most part of the goal.

Roblox gives you the group itself, if players formed one before joining. Player.PartyId holds the party a player is in, or an empty string. SocialService:GetPlayersByPartyId(partyId) returns the connected players with that party id, and SocialService:GetPartyAsync(partyId) returns members across all of the game's servers3. Studio's Party Simulator fills these in during a Server & Clients test, so you can try party code without publishing4.

Beacon Yard's lobby queue does not use parties yet: it groups whoever is next in the queue, MATCH_SIZE = 2 at a time. The party queue exercise in Capstone, part 3: multi-product receipts and party matchmaking is the first step to keeping friends together.

Where a party shows upA gold Player.PartyId box feeds two boxes: GetPlayersByPartyId for players in this server, and GetPartyAsync for members across every server of the game.Player.PartyIdempty if noneGetPlayersByPartyIdthis serverGetPartyAsyncevery server
One party id, two ways to read it.
Work it out

A crew goal is 100 drone hits and each player counts for at most half of it. This week one player made 90 hits, a second made 30 and a third made 5. What is the crew's progress?

hits

Link to this step · This confused me

Step 7 of 10

Competition without driving players away

Competition is the oldest group shape and the easiest to get wrong. It works when players are matched to similar players, when losing still teaches something, and when money cannot buy the win. Beacon Yard's leaderboard sits on the safe side: it ranks coins earned in one match, a shared fight against the same drone.

Roblox's monetization guide asks you to know whether your players are competitive5, because the same item reads differently there. A Speed upgrade that helps a teammate in co-op lets a payer beat a free player in a race. In a competitive mode, sell looks, not wins.

Choose one

You add a race mode: first player to touch all six coin pads wins. What should happen to the Speed Pass bonus (+4 walk speed) in that mode?

You add a race mode: first player to touch all six coin pads wins. What should happen to the Speed Pass bonus (+4 walk speed) in that mode?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 8 of 10

Trading: why Beacon Yard should say no for now

Trading is the feature players ask for most, and the one that breaks most games. Before you build it, check four things:

  1. Is there anything worth trading? At m16-design-pass the profile holds coins, upgrade tiers, quest progress and a prestige marker: all earned per player, none unique. Coins are the same for everyone, and tiers and Speed are upgrades, not items. There is nothing to swap.
  2. Can you make a swap atomic? Both sides change at once or neither does, even when a server crashes between two saves. The capstone showed how a two-write window loses or copies items; a trade has that window on both sides.
  3. Can you police it? Scams ("trade first, I'll send after"), alt accounts feeding a main, and selling items for real money all arrive with trading.
  4. Are you allowed? PolicyService:GetPolicyInfoForPlayerAsync returns IsPaidItemTradingAllowed, which says whether a player may trade items bought with Robux or with in-game currency6. Roblox also suggests using Player.DeviceTrustLevel on the server to keep sensitive features like trading to trusted devices7.

Other ways pros do this

OptionWhat it isWhen pros pick itTrade-offs
No tradingItems stay with the player who earned or bought them.Games without unique items, or teams without time to police a market. Beacon Yard today.Players cannot show generosity or build a market; fewer reasons to bring friends.
Gifting onlyA one-way send, such as buying an item for a friend in the same server, with no item coming back.Cosmetics, when you want a social gesture without a market.Still needs the policy check and a cap; no haggling, so fewer scams.
Server-held two-sided tradeBoth offers locked, a countdown, then one server write that moves both sides, with an audit log.Games built around collecting unique items.Escrow, crash handling, scam reports and alt detection are a team's ongoing work.
Robux transfersRoblox Plus subscribers send 10 to 500 Robux to another user from inside your game; Roblox runs the transfer and your game earns 10%.When you want players to help each other with money and not items.You do not see the transfer details or control it, and only subscribers can send. With many young players, never prompt a transfer the sender did not ask for, and do not reward the recipient; perks for senders invite begging.
Choose all that apply

Your team wants to add trading to Beacon Yard next month. Which are good reasons to wait?

Your team wants to add trading to Beacon Yard next month. Which are good reasons to wait?

Press 1 to 5 to choose, Enter to check.

Link to this step · This confused me

Step 9 of 10

Build along: the beacon repair

This part builds the m16-design-pass milestone. The rules live in one pure module so the server code stays thin and the Level 3 test can check them without two clients.

  • src/shared/CoopRules.luau
  • src/shared/data/rewards.json
  • src/shared/Config.luau
  • src/server/MapBuilder.luau
  • src/server/CoopService.luau
  • src/server/init.server.luau
  1. Write the rules first in challenges/work/coop_rules.luau until designing-for-groups passes, then copy them into src/shared/CoopRules.luau.

    You should see CoopRules.luau has available, pull, isRepaired and crewProgress, and the Level 3 test passes against your work file.

  2. In MapBuilder.luau, add a lever(side, x) helper and build the levers at x = -20 and x = 20 on opposite sides of the beacon ring. Keep the prompts disabled and return them as leverPrompts = { left, right } in the map handles; CoopService turns them on.

    You should see Two lever parts named LeverLeft and LeverRight stand about 40 studs apart, each with a ProximityPrompt that says Pull, hold 0.3.

  3. In CoopService.luau, enable both prompts only when CoopRules.available(#Players:GetPlayers()) is true and the round phase is not Active. Recheck on PlayerAdded, PlayerRemoving (counting the leaving player out) and every phase change. Add CoopService to the server roles in init.server.luau.

    You should see With one player the prompts stay hidden. With two players in Cooldown or Idle they appear; with Active they hide.

  4. Add a BeaconRepair row (15 coins) to rewards.json and read it as Config.CREW_BONUS = Content.reward("BeaconRepair").coins. In CoopService, keep the BeaconDamaged workspace attribute: a new server starts rattled, and every drill sets it again when it ends. That gate stops one pair from farming the bonus between drills. On each prompt's Triggered, refuse a pull when the beacon is not damaged, otherwise call CoopRules.pull with workspace:GetServerTimeNow(), then CoopRules.isRepaired with a present set built from Players:GetPlayers(). A lever that another player pulled inside the window refuses the new pull with the toast "That lever is already held" (the same player may pull again), and while a lever is held, set LeverHeldUntil (server time) on its part and enable a HeldGlow PointLight, so the partner sees it. On success, clear the damage and, for each of the two pullers, add Config.CREW_BONUS through DataService.addCoins, log a coinSource economy event with the SKU CrewRepair, log beacon_repaired, and fire the repair game event for the quest board.

    You should see A pulled lever glows for every client for 1.5 s, and a second player who pulls it hears 'That lever is already held'. Two clients pulling within 1.5 s repairs a rattled beacon once, pays each puller 15 coins once, and resets both levers. Pulling again before the next drill answers 'The beacon is fine'.

When you test the levers with two clients, watch your partner's wrench too. With no swing animation uploaded, a swing turns Tool.Grip on the swinger's client, and that change stays on that client. So at m16-design-pass the server relays every swing it accepts as SwingSeen to the other players, and each of them plays the same arc on the swinger's wrench (the Game feel: juice, hit stop and feedback lesson builds it). You see your partner swing, with no trail and no sparks: sparks come only with the swinger's own confirmed hit. A team reads each other through the world, so a teammate who looks frozen mid-fight feels like lag even when the server is fine.

Roblox Studio
Roblox Studio's mezzanine testing controls with the testing mode dropdown set to Server and Clients and the client count set to 2, ready to start a two-player test of Beacon Yard.

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

The Server & Clients mode with two clients: the quickest way to test a two-player rule on one machine.

Choose one

Why does the build make the repair a bonus between drills instead of a requirement before the next drill can start?

Why does the build make the repair a bonus between drills instead of a requirement before the next drill can start?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 10 of 10

Challenges and recap

Level 2, Builder

Challenge

Design one more group feature for the yard on one page, and test its riskiest rule with two clients.

Start from
The game at milestone m14 (download)

Done means

  • One page that names the shape (co-op with roles, shared goal, competition or exchange) of one new group feature for Beacon Yard
  • What a solo player sees, what happens when one player leaves mid-task, and what an idle or griefing player can and cannot block
  • Which recommender signal it should move and the custom or economy event you would log to see it
  • A two-client test in Studio's Server & Clients mode, with what you saw in each client

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

Level 3, Professional

Challenge

In the game repo, edit challenges/work/coop_rules.luau until RunGameTests:Invoke("designing-for-groups") passes in the Course Runner.

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

Done means

  • available hides the repair from a server with fewer than 2 players
  • pull returns a new table, ignores unknown levers and lets go of the other lever held by the same player
  • isRepaired needs two different players, both present, at most 1.5 s apart and at most 1.5 s old
  • crewProgress ignores negative amounts, caps each player at half the goal and the total at the goal

The Course Runner prints this code when the test passes.

Retiring the analogy

You no longer need “a two-person saw, with a handle at each end”. The server decides with its own clock: a window absorbs lag, a presence check ignores a player who left, the same userId on both levers never counts, and the objective is a bonus between drills, so an idle or griefing player can cost the others a reward but never their session.

Recap

  1. Beacon Yard at m14-ship is multiplayer but not cooperative: requestStart and awardSurvival treat every player alone.
  2. Roblox lists intentional co-play days per user, days users return to play with friends, among the important signals for Home recommendations.
  3. Group play has four shapes: co-op with roles, shared goals, competition and exchange, each with its own risks.
  4. A co-op rule must name two different players, check that both are still present, use a server-measured window, and be a bonus rather than a gate.
  5. Trading waits until a game has items worth trading, an atomic swap, a way to police it, and PolicyService and device trust checks.

A co-op objective that needs two players is a two-person saw, with a handle at each end, until the two sawyers are side by side and can see each other. Online players are on separate devices with their own lag, either can leave mid-pull, and a third player can stand on a handle and never pull.

Next Monetization design players respect

Link to this step · This confused me