Capstone, part 2: cosmetic pass trail, localization and thumb targets

Part 2 of the Beacon Yard capstone crosses monetization, VFX, localization and React UI: add a cosmetic pass trail and localized shop entry in Studio, then fix the 44px Close button in ShopApp.luau.

Project lesson, about 55 minutes, 6 steps

By the end you can

  • Build a server-owned cosmetic pass trail in PassService that never changes WalkSpeed, and wire its localized label into ShopLabels and Strings.csv
  • Fix a real 44-pixel touch-target bug in m14-ship's React shop (ShopApp.luau) while keeping all three Controls.luau wrench bindings intact
  • Prove both changes with the Studio playtest (capstone_cosmetic_trail) and the browser-graded mobile rule check

Before this: Capstone, part 1: brief, rules and two yard extensions, UI frameworks, part 1: React-lua, elements, props and state, Localization: reaching other languages

Step 1 of 6

Why SpeedPass and a cosmetic trail follow different design rules

A game pass is bought once and owned for good, so there is no receipt to process1. The server asks MarketplaceService whether the player owns it and stores the result as a server-written player attribute.

-- A game pass is bought once and owned for good, so there is no receipt
-- to process. The server asks MarketplaceService whether the player owns
-- the pass, and writes the answer to the SpeedPass player attribute.
-- DataService.applySpeed reads that attribute and adds
-- Config.PASS_SPEED_BONUS. A client cannot set a server attribute, so a
-- client cannot give itself the pass.

Notice the design difference. Beacon Yard's SpeedPass adds Config.PASS_SPEED_BONUS (+4 walk speed) because Beacon Yard is a cooperative PvE drill where faster teammates help everyone survive. A cosmetic pass such as a spark trail must never alter WalkSpeed, health, or damage, because selling stats in competitive games breaks fairness.

Server sideRemember: The server is the referee with the only real scoreboard.

Choose one

A LocalScript fires a remote claiming TrailPass = true. What should the server do?

A LocalScript fires a remote claiming TrailPass = true. What should the server do?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 2 of 6

Keeping ShopLabels and Strings.csv in sync

At m14-ship, every visible word in the React shop starts in ShopLabels.luau's SOURCE table and has a matching row in src/locale/Strings.csv (which Rojo maps to LocalizationService.BeaconStrings)2. Adding a new shop item without adding its translation row leaves French and Spanish players seeing untranslated English or raw keys.

local SOURCE: { [string]: string } = {
	["shop.title"] = "Quartermaster",
	["shop.close"] = "Close",
	["shop.speed"] = "Speed",
	["shop.speed.detail"] = "faster for good",
	["shop.shield"] = "Shield",
	["shop.shield.detail"] = "blocks one drone hit",
	["shop.price"] = "{n} coins",
	["shop.item.short"] = "{price}, need {short} more",
	["shop.item.ok"] = "{price}, {detail}",
	["shop.wallet"] = "You have {n} coins",
	["shop.pack"] = "Coin Pack",
	["shop.pack.ready"] = "{n} coins",
	["shop.pass"] = "Speed Pass",
	["shop.pass.owned"] = "owned",
	["shop.pass.sale"] = "+{bonus} speed for good, Robux",
Where does it break?“The referee with the only real scoreboard” is a good picture of the server. Where does it stop being true?

It breaks here. The server is also the field itself, and it cannot see things that exist only on a client, such as a player's GUI or a LocalScript's effects.

The true model. The server runs the authoritative copy of the whole game world. Anything that matters (coins, damage, purchases) is decided there, and clients only see what it replicates to them.

The server owns the TrailPass attribute and the Trail on the character, while each client's Translator renders the label in that player's language.

Choose one

A LocalScript changes the trail button's label on one player's screen. Does PassService see that label change or treat it as a pass purchase?

A LocalScript changes the trail button's label on one player's screen. Does PassService see that label change or treat it as a pass purchase?

Press 1 to 2 to choose, Enter to check.

Choose one

If you add shop.trail to ShopLabels.luau but forget to add a matching row to src/locale/Strings.csv, what happens when a French player opens the shop?

If you add shop.trail to ShopLabels.luau but forget to add a matching row to src/locale/Strings.csv, what happens when a French player opens the shop?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 3 of 6

Build and grade Project 3 in Studio

Extend your m14-ship game in three files:

  1. In src/server/PassService.luau, add PassService.hasTrail(player: Player): boolean (reads player:GetAttribute("TrailPass") == true) and PassService.setTrail(player: Player, owned: boolean). Write the "TrailPass" attribute, create two Attachment instances on the character's HumanoidRootPart (Vector3.new(0, 1, 0) and Vector3.new(0, -1, 0)), attach a Trail named "PassTrail" between them, toggle trail.Enabled = owned, and leave WalkSpeed untouched. Also re-apply the trail on player.CharacterAdded if PassService.hasTrail(player) is true.
  2. In src/shared/ShopLabels.luau, add ["shop.trail"] = "Spark Trail" to SOURCE.
  3. In src/locale/Strings.csv, add a shop.trail row with en, fr and es translations.
  4. Press Play and run game.ServerScriptService.RunGameTests:Invoke("capstone_cosmetic_trail", "capstone-cosmetic-trail") in the server command bar.

Level 3, Professional

Challenge

Extend PassService.luau, ShopLabels.luau and Strings.csv in your m14-ship game, then run challenges/capstone_cosmetic_trail.luau in Studio. Solution: challenges/solutions/capstone-trail-ui.md.

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

Done means

  • PassService.setTrail(player, true) sets the TrailPass attribute to true and attaches an enabled Trail named PassTrail with both attachments
  • Calling DataService.applySpeed(player) with TrailPass enabled leaves Humanoid.WalkSpeed identical to before
  • PassService.setTrail(player, false) sets TrailPass to false and disables or removes PassTrail
  • ShopLabels.source()['shop.trail'] is non-empty and LocalizationService.BeaconStrings has a shop.trail row with en, fr and es entries
  • challenges/capstone_cosmetic_trail.luau prints TEST PASS for all five checks

The Course Runner prints this code when the test passes.

Choose one

A player owns TrailPass, dies during a drill, and respawns with a brand-new Character model. Why does PassService need a CharacterAdded listener?

A player owns TrailPass, dies during a drill, and respawns with a brand-new Character model. Why does PassService need a CharacterAdded listener?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 4 of 6

Project 4: spot the 44px touch bug in m14-ship's React shop

Touch targets on phones need at least 48 by 48 pixels so a thumb does not miss or hit the wrong row3. Now inspect src/client/ShopApp.luau at m14-ship: each ShopButton is 84 pixels tall, but look at the Close button at the bottom of the panel.

		Close = e("TextButton", {
			Size = UDim2.new(1, 0, 0, 44),

Close is 44 pixels tall: four pixels below the 48-pixel rule. Meanwhile, src/client/Controls.luau binds the wrench across keyboard (F), gamepad (ButtonR2) and a touch button (touchButton = true). Any UI or input tweak must preserve all three devices.

	WrenchSwing = {
		title = "Swing",
		inputs = { Enum.KeyCode.F, Enum.KeyCode.ButtonR2 },
		touchButton = true,

Other ways pros do this

OptionWhat it isWhen pros pick itTrade-offs
React-lua (m09-react-shop onward)Declarative components and hooks installed through Wally; state changes re-render only the changed Instances.Complex menus, shops, inventories and multi-state HUDs like Beacon Yard's ShopApp.Extra package dependency and a mental shift from imperative Instance.new code.
Fusion or VideReactive state-graph UI libraries popular in Roblox studios.Teams that prefer fine-grained reactive values over React's render tree and hooks.Smaller ecosystem than React-lua and fewer cross-platform React developers.
Plain Instances (m07-feel ShopGui)Direct Instance.new and property mutations in Luau.Tiny one-off prompts or learning how ScreenGui and layouts work.State updates scatter across callbacks and become bug-prone as screens grow.
Work it out

In m14-ship's ShopApp.luau, how many pixels too short is the 44px Close button compared to the 48px touch-target minimum?

pixels
Choose one

Which three input devices does Controls.luau bind under the single action name WrenchSwing at m14-ship?

Which three input devices does Controls.luau bind under the single action name WrenchSwing at m14-ship?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 5 of 6

Fix the rule cell and ShopApp.luau

Fix thumbOk and wrenchBindings in the browser cell below to grade Project 4. To grade in Studio instead, copy your rules into challenges/work/capstone_mobile.luau, press Play and run game.ServerScriptService.RunGameTests:Invoke("capstone_mobile", "capstone-mobile") in the server command bar. Then raise Close's height from 44 to 48 and the panel's Size from 636 to 640 in your own src/client/ShopApp.luau. Neither grader opens ShopApp.luau. They only test the two helper rules, so a pass code does not prove the shop changed. You check the shop yourself: press Play, open the shop on a phone-sized emulator and confirm every button is at least 48 pixels tall and nothing clips.

Luau
Ctrl Enter runs the cell. Checked by tests

Level 2, Builder

Challenge

Pass the code cell above (or challenges/capstone_mobile.luau in Studio), then update Close in src/client/ShopApp.luau and check it by eye. The pass code covers the first two criteria only. Solution: challenges/solutions/capstone-trail-ui.md.

Start from
The game at milestone m14 (download)
Check it here
Run the code cell; the challenge completes when it passes. No Studio needed.
Or grade it in Studio
In Studio, press Play, then run game.ServerScriptService.RunGameTests:Invoke("capstone_mobile", "capstone-mobile") in the server command bar. Copy the pass code from Output.

Done means

  • thumbOk returns true only when both width and height are at least 48
  • wrenchBindings returns Touch, F and ButtonR2
  • Manual check, not covered by the pass code: in your own src/client/ShopApp.luau, Close has height 48 and the panel height is 640 so nothing clips
Have a Studio pass code?

The Course Runner prints this code when the test passes.

Choose one

After raising Close's height from 44 to 48 inside ShopApp.luau, why do we also raise the parent Frame's height from 636 to 640?

After raising Close's height from 44 to 48 inside ShopApp.luau, why do we also raise the parent Frame's height from 636 to 640?

Press 1 to 4 to choose, Enter to check.

Link to this step · This confused me

Step 6 of 6

Recap

Recap

  1. Project 3 adds a server-owned TrailPass attribute and cosmetic PassTrail in PassService without altering WalkSpeed, plus en/fr/es entries for shop.trail in ShopLabels and Strings.csv.
  2. Project 4 catches and fixes a real 44px Close button in m14-ship's ShopApp.luau and verifies the 48px touch rule and three-device wrench bindings.

The server is the referee with the only real scoreboard, until the server is also the field itself, and it cannot see things that exist only on a client, such as a player's GUI or a LocalScript's effects.

Next Capstone, part 3: multi-product receipts and party matchmaking

Link to this step · This confused me

Sources
  1. Passes. Roblox Creator Documentation, checked 2026-11-23.
  2. Localization. Roblox Creator Documentation, checked 2026-11-23.
  3. Mobile input. Roblox Creator Documentation, checked 2026-11-13.