Roblox Data

TabooHarmony/roblox-brain/skills/core/roblox-data

by TabooHarmony38826be57ee37bcf023e9c2b85681bea3909281cNo licenseListed Oct 9, 2026Updated Oct 9, 2026

Use when implementing player data persistence with DataStore, session ownership, schemas, migrations, or save and load flows.

Instructions onlySoftware Development
AI-generated overview

Guides Roblox player data persistence with DataStore, session ownership, schemas, migrations, and save/load flows.

What it does
This skill provides reference guidance for implementing player data persistence in Roblox experiences. It covers defining serializable templates with version fields, using UpdateAsync for read-modify-write, preventing concurrent session mutation, saving at lifecycle boundaries, validating stored values, and handling right-to-be-forgotten key schemes. It also points to a fuller reference document for persistence workflows.
When to use it
Use it when implementing or reviewing Roblox player save and load systems, data schemas, migrations, retries, shutdown handling, or session ownership. It is aimed at DataStore-based persistence rather than leaderboards, messaging, world data, or Open Cloud.
Requirements
No scripts; instructions only. It assumes a Roblox development context with DataStore access and references an additional model-readable reference file.

roblox data persistence

When to Load

Load for player saves, migrations, retries, shutdowns, or session ownership. Leaderboards/messaging/world data: roblox-server-data; Open Cloud: roblox-cloud.

Quick Reference

  • Define a serializable template and a version field before storing player state. Deep-copy templates so nested defaults are not shared; migrate, then reconcile missing fields against the template. Scope store names by environment (PlayerData_Studio) so Studio writes stay out of production.
  • Use UpdateAsync for read-modify-write; handle throttling and transient errors.
  • Prevent two servers mutating one profile at once: a session-ownership wrapper or equivalent protocol.
  • With ProfileStore: StartSessionAsync, Profile.OnSessionEnd, EndSession as documented; no Steal for normal loads; ProfileStore.Mock for ephemeral Studio writes.
  • Save on meaningful changes and lifecycle boundaries; PlayerRemoving alone is not sufficient. BindToClose finishes pending work.
  • Store primitives, arrays, dictionaries; convert Instances/userdata/functions/cyclic tables first. Validate numbers (no NaN/inf), strings (utf8.len), nested tables: one bad value fails the write.
  • RTBF: keep the user ID as a static substring in keys (player_<UserId>) so {UserId} deletion templates can match; hashed or random keys make erasure manual.
  • GetAsync serves a 4-second local cache (DataStoreGetOptions.UseCache, default true); verify writes with UseCache = false.
  • Poll DataStoreService:GetRequestBudgetForRequestType for live headroom; quotas scale with concurrent users (experience reads: 300 + concurrentUsers x 40/min).
  • New code identifies users with player.User (User.Id, DomainType, DomainId); UserId remains valid, but never mix the two IDs in one key scheme.

Persistence workflows: references/full.md [blocked]

Source and attribution

Source:TabooHarmony/roblox-braininskills/core/roblox-dataat commit38826be

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal