First publish: private cloud place, API access and Ids.local

Publish Beacon Yard privately before uploading animations or testing DataStores. Enable Studio Access to API Services, configure Ids.local.luau, and run gen-assets and check-ids.

Tool lesson, about 35 minutes, 7 steps

By the end you can

  • Publish Beacon Yard to Roblox as a private place without releasing it publicly
  • Enable Studio Access to API Services in Experience Settings so DataStores and cloud APIs work in Play
  • Create a git-ignored Ids.local.luau with your own Universe ID and Place ID and verify it with scripts/check-ids.mjs
  • Explain what scripts/gen-assets.mjs generates and why uploaded meshes need a place rebuild

Before this: The wrench: tools, raycasts, tags

1Why a local file hits a wall

Press Play on m06-drone-wrench from a local .rbxlx file and look at Output. DataService may print a yellow DataStore unavailable warning and fall back to keeping profiles in memory:

local function getStore(): DataStore?
	if storeResolved then
		return store
Figure 1.1

Cloud services such as DataStoresDataStoreRoblox's persistent key-value storage for saving player data between sessions.Think of it as a bank vault in another city. need a published PlacePlaceOne world inside an experience, with its own parts, scripts and interface.Think of it as one building on the campus. with Studio API access turned on1. Even sooner, the next lesson (Animation: the Animation Editor, Moon Animator, Animator) uploads a wrench swing animation, and Roblox only lets an ExperienceExperienceA game on Roblox as players see it: one name, one page, one or more places inside.Think of it as a campus with one or more buildings. load animations owned by the same user or group, or ones the owner has granted that experience access to.

An experience is a campus and each place is a building inside it. Until you publish once, your blueprints are still sitting on your desk with no campus address and no cloud vaults attached.

Think of it as A campus of buildings

Server sideRemember: Experiences and places is a campus of buildings.

Why does DataService.getStore wrap DataStoreService:GetDataStore in pcall on an unpublished local place file?

  1. The lookup can fail when the place is unpublished or Studio API access is off, so pcall lets the game warn once and stay playable in memory
  2. GetDataStore only works in LocalScripts
  3. Rojo deletes DataStores during rojo serve
  4. pcall turns on Studio API access automatically
Answer

The lookup can fail when the place is unpublished or Studio API access is off, so pcall lets the game warn once and stay playable in memory. Without a published place and Studio API access, Studio cannot reach data stores, and the lookup or a later call may fail. Wrapping the lookup in pcall lets Beacon Yard warn once and fall back to in-memory profiles.

Open this step in lesson mode · Link to this step · This confused me

2Publish privately without going public

Publishing uploads your start place to Roblox's cloud. The game gets a Universe IDUniverse IDThe unique number Roblox assigns to an entire experience (which can hold one or more places).Think of it as the street address of the whole campus, separate from each building's room number. and its start place gets a Place ID2. The game starts private. You and collaborators with Edit access can open it. Members of a group game need the appropriate permissions2. Public release, store icons, thumbnails and Version History wait until Publishing: versions, rollback, store page.

To publish Beacon Yard privately for the first time2:

  1. Build a fresh place file with rojo build -o beacon-yard.rbxlx and open it in Studio.
  2. Open File > Publish to bring up Game details.
  3. Enter a Name, such as Beacon Yard Dev, select a Genre and write a short Description.
  4. Click Save to publish the game privately. If Studio shows Basic Info as in the capture below, fill in the name and description and click Create.

To share a preview, use File > Invite early testers after saving. Choose eligible friends in the dialog and click Invite2.

Roblox Studio
Roblox Studio's File > Publish to Roblox As window on the Basic Info step, with Name set to Beacon Yard, a short Description, Team Create off and the Create button.

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

Figure 2.1.

This Studio capture shows Basic Info and Create. Roblox's current publishing guide calls those controls Game details and Save2.

You save Beacon Yard Dev from Game details. Who has access by default, before you invite early testers?

  1. You and collaborators with Edit access. In a group game, access follows group permissions.
  2. Anyone searching Roblox
  3. Every member of Roblox aged 16 and over
  4. Nobody until you pay a publishing fee
Answer

You and collaborators with Edit access. In a group game, access follows group permissions.. Saving creates a private cloud game. Invite early testers separately if you want friends to preview it.

Open this step in lesson mode · Link to this step · This confused me

3Turn on Studio Access to API Services

Even after publishing, Studio blocks cloud APIs such as DataStores by default so a playtest cannot touch live player data by mistake1. Enable Studio Access to API ServicesStudio Access to API ServicesA per-experience Security toggle that lets Studio Play call cloud services such as DataStores.Think of it as a keycard letting your local test bench open the experience's real cloud vaults. for your private development place1:

  1. Open File > Experience Settings in Studio.
  2. Click Security in the left sidebar.
  3. Turn on the Enable Studio Access to API Services toggle.
  4. Click Save.

Roblox's documentation gives an important warning: Studio accesses the same DataStores as live servers for that experience1. Never turn this toggle on for a live production game; keep it on a separate private development experience. When you later make this experience public (Publishing: versions, rollback, store page), turn the toggle off first, or release from a separate production experience.

Where does it break?“A campus of buildings” is a good picture of experiences and places. Where does it stop being true?

It breaks here. A campus has one copy of each building, but Roblox runs many copies of the same place at once, one per server, and those copies know nothing about each other.

The true model. An experience holds places. Every server runs its own copy of one place for the players on it. Servers share nothing unless the game uses a cross-server service such as DataStores or MessagingService.

Two groups join different servers of the same published Beacon Yard place. If one group starts a drill, does it start for the other group?

  1. No. Each server runs its own copy of the place.
  2. Yes. All players in a place share one running copy.
Answer

No. Each server runs its own copy of the place.. A place is what you publish. Each server runs a separate copy with its own round state.

Why does Roblox warn against turning on Enable Studio Access to API Services for a live public game?

  1. Studio playtests read and write the exact same DataStores as live players, so a test could corrupt real saves
  2. It makes the game private again
  3. It disables Rojo live sync
  4. It charges Robux for every Play press
Answer

Studio playtests read and write the exact same DataStores as live players, so a test could corrupt real saves. Studio shares the experience's real DataStores. Studios keep a separate private dev or staging experience with API access on, and leave it off in production.

Open this step in lesson mode · Link to this step · This confused me

4Find your Universe ID and Place ID

Now collect the two numbers Roblox created for your private experience from the Creator Dashboard:

  • Universe ID: hover over your game's thumbnail on the Creator Dashboard, click the ⋯ button, and choose Copy Universe ID3.
  • Place ID: click your game's thumbnail, open Configurations > Places (or the Places tab) in the left navigation, click the start place (marked with a star icon), and read the number after /places/ in the browser URL (.../places/<PlaceId>/configure)45.

Menu locations, Output shortcuts and copy commands differ slightly between Windows and macOS:

Windows

  • Studio's File menu sits in the top-left corner of the Studio window (File > Publish and File > Experience Settings).
  • Clear Studio's Output window with Ctrl+K6.
  • In PowerShell inside your beacon-yard folder, create your local ids file from the example:
powershell
Copy-Item src\shared\Ids.local.example.luau src\shared\Ids.local.luau

macOS

  • Studio's File menu sits in the macOS menu bar at the very top of your screen (File > Publish and File > Experience Settings).
  • Clear Studio's Output window with Cmd+K6.
  • In Terminal inside your beacon-yard folder, create your local ids file from the example:
bash
cp src/shared/Ids.local.example.luau src/shared/Ids.local.luau

Match each setup task to its verified Studio or Creator Dashboard path.

  1. Publish privately using the Game details dialog
  2. Enable DataStores in Studio Play
  3. Copy your Universe ID
  4. Find your start Place ID
Answer

Publish privately using the Game details dialog: Studio: File > Publish > Game details > Save; Enable DataStores in Studio Play: Studio: File > Experience Settings > Security > Enable Studio Access to API Services; Copy your Universe ID: Creator Dashboard: hover game thumbnail > ⋯ > Copy Universe ID; Find your start Place ID: Creator Dashboard: game > Configurations > Places > click start place > read /places/<id>/ in URL. Every click path comes straight from current Studio and Creator Hub menus.

Open this step in lesson mode · Link to this step · This confused me

5Ids.local.luau, gen-assets and check-ids

Beacon Yard ships src/shared/Ids.luau with every account-bound number set to 0. Your own numbers live in src/shared/Ids.local.luau, which .gitignore excludes so your account ids never enter Git. When any script requires Ids, applyLocalOverrides merges your file over the defaults and warns on typos or invalid numbers:

local function applyLocalOverrides()
Figure 5.1

Two Node scripts in scripts/ work with the same file:

  • node scripts/gen-assets.mjs reads Ids.luau and Ids.local.luau, fills placeholders in assets/templates/, and writes models to git-ignored assets/roblox/ and material variants to assets/materials/. Because Roblox does not let scripts change MeshPart.MeshId directly, and Rojo's live sync works through a script-driven plugin, rojo serve leaves MeshParts empty; rebuild with rojo build -o beacon-yard.rbxlx after generating meshes.
  • node scripts/check-ids.mjs scans every tracked or unignored file outside the three Ids files and fails if it sees a 9-or-more-digit number or an asset URL, stopping real ids from leaking into a commit:
const ALLOWED = new Set(["src/shared/Ids.luau", "src/shared/Ids.local.luau", "src/shared/Ids.local.example.luau"]);
 
// Built in two pieces so this file does not trip its own check.
const ASSET_URL = "rbxasset" + "id://";
// Nine or more digits that are not part of a word, a hex hash or a decimal fraction.
const LONG_NUMBER = /(?<![\w.])\d{9,}(?!\w|\.\d)/g;
Figure 5.2

Complete this Luau simulation of applyLocalOverrides so it skips unknown keys and non-whole or negative numbers.

Luau
local function mergeIds(defaults, overrides)
	local out = table.clone(defaults)
	for key, value in overrides do
		-- Only copy key when defaults[key] ~= nil and value is a
		-- whole number of 0 or more (typeof(value) == "number", value >= 0, value % 1 == 0).
		if defaults[key] ~= nil then
			out[key] = value
		end
	end
	return out
end
 
local merged = mergeIds({ UNIVERSE_ID = 0, PLACE_ID = 0 }, { UNIVERSE_ID = 4200, PLACE_ID = -3, TYPO = 99 })
print(merged.UNIVERSE_ID, merged.PLACE_ID, merged.TYPO)
Figure 5.3. Run it in the lesson view or in the Studio command bar. The lesson view checks it with tests.

In Beacon Yard's Ids.luau, what happens if Ids.local.luau sets UNIVERSE_ID = 4200, PLACE_ID = 1.5, and BAD_KEY = 10?

return {
	UNIVERSE_ID = 4200,
	PLACE_ID = 1.5,
	BAD_KEY = 10,
}
  1. UNIVERSE_ID becomes 4200; PLACE_ID stays 0 with an [Ids] warning; BAD_KEY is ignored with an [Ids] warning
  2. The whole server crashes at boot
  3. All three keys are copied into Ids
  4. Ids.local.luau is ignored completely and UNIVERSE_ID stays 0
Answer

UNIVERSE_ID becomes 4200; PLACE_ID stays 0 with an [Ids] warning; BAD_KEY is ignored with an [Ids] warning. applyLocalOverrides checks each entry independently: valid whole numbers apply, while unknown keys and non-whole numbers log an [Ids] warning and are skipped.

Open this step in lesson mode · Link to this step · This confused me

6Publish Beacon Yard and wire your IDs

Other ways pros do this

OptionWhat it isWhen pros pick itTrade-offs
Personal accountPublish under your own Roblox account.Solo learning and course work like Beacon Yard.Harder to share edit access and asset ownership if a team joins later.
Roblox GroupPublish under a Group you own, with role permissions.Any team project or game that may hire collaborators.Requires creating a group and selecting it as Creator on every upload.

Build along

m06-drone-wrench

  • src/shared/Ids.luau
  • src/shared/Ids.local.example.luau
  • scripts/gen-assets.mjs
  • scripts/check-ids.mjs
  1. Build beacon-yard.rbxlx (rojo build -o beacon-yard.rbxlx), open it in Studio, publish privately with File > Publish, then turn on File > Experience Settings > Security > Enable Studio Access to API Services and click Save.

    You should see Studio saves the place privately to Roblox and Experience Settings saves with Enable Studio Access to API Services turned on.

  2. Copy your Universe ID and Place ID from the Creator Dashboard, copy src/shared/Ids.local.example.luau to src/shared/Ids.local.luau, and set UNIVERSE_ID and PLACE_ID (leave the remaining keys out or at 0).

    You should see src/shared/Ids.local.luau holds your Universe ID and Place ID, and git status does not list it as untracked.

  3. Run node scripts/check-ids.mjs and node scripts/gen-assets.mjs, rebuild or connect Rojo, press Play in the published Studio place, and confirm Output no longer shows DataStore unavailable.

    You should see check-ids prints clean, gen-assets reports 0 written and skips unset models cleanly, and Studio Play no longer prints DataStore unavailable.

Later, when you add mesh ids to Ids.local.luau and run node scripts/gen-assets.mjs, why does rojo serve leave the MeshParts empty?

  1. Scripts cannot change MeshPart.MeshId directly, so you must run rojo build and open the built place file
  2. gen-assets.mjs only writes textures, never meshes
  3. Rojo ignores the assets/roblox folder
  4. Meshes only load when a game is released publicly
Answer

Scripts cannot change MeshPart.MeshId directly, so you must run rojo build and open the built place file. Because scripts cannot change MeshPart.MeshId directly, rojo serve creates empty MeshParts. Running rojo build writes the mesh ids into the place file so Studio loads them.

Open this step in lesson mode · Link to this step · This confused me

7Challenges and recap

Level 1, Apprentice

Challenge

Finish the validation check in ids-override-sim above so it matches Beacon Yard's Ids.luau guard rules.

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

Done means

  • Copy only keys that already exist in defaults
  • Reject negative numbers and non-whole numbers
  • All four assertions in ids-override-sim pass

Hints

  1. Check typeof(value) == "number" and value >= 0 and value % 1 == 0.
  2. Use an and chain inside the if statement.
Solution
luau
if defaults[key] ~= nil and typeof(value) == "number" and value >= 0 and value % 1 == 0 then
	out[key] = value
end

Level 2, Builder

Challenge

Complete the private publish, enable Studio API access, create src/shared/Ids.local.luau, and confirm git status ignores it while node scripts/check-ids.mjs passes.

Start from
The game at milestone m06 (download)

Done means

  • Your Beacon Yard copy is published privately in Studio with Enable Studio Access to API Services turned on
  • src/shared/Ids.local.luau contains your UNIVERSE_ID and PLACE_ID and is ignored by git status
  • node scripts/check-ids.mjs exits with 0 and reports all files clean

Hints

  1. Use File > Experience Settings > Security in Studio after your first File > Publish.
  2. Never put a real id in Ids.luau or Ids.local.example.luau; only Ids.local.luau is git-ignored.

Which of these statements are true about scripts/check-ids.mjs in Beacon Yard?

  1. It allows ids only inside Ids.luau, Ids.local.luau and Ids.local.example.luau
  2. It fails if a 9-or-more-digit number appears in another tracked or unignored file
  3. It fails if an asset URL appears outside the Ids files
  4. It automatically uploads your place to Roblox
Answer

It allows ids only inside Ids.luau, Ids.local.luau and Ids.local.example.luau; It fails if a 9-or-more-digit number appears in another tracked or unignored file; It fails if an asset URL appears outside the Ids files. check-ids.mjs is a guard script: it checks tracked and unignored files outside the three Ids files for 9+ digit numbers and asset URLs, and never publishes anything.

Recap

  1. File > Publish in Studio creates a private cloud place with a Universe ID and Place ID without releasing publicly.
  2. Turn on File > Experience Settings > Security > Enable Studio Access to API Services only on a private dev experience, never on a live game.
  3. Store your real ids in git-ignored Ids.local.luau, run node scripts/gen-assets.mjs for templates (rebuilding for meshes), and run node scripts/check-ids.mjs to keep ids out of Git.

Experiences and places is a campus of buildings, until a campus has one copy of each building, but Roblox runs many copies of the same place at once, one per server, and those copies know nothing about each other.

Next Animation: the Animation Editor, Moon Animator, Animator

Open this step in lesson mode · Link to this step · This confused me