# Roblox Data

> DataStores, ProfileStore, session locking, data persistence patterns.

- **Type:** Skill
- **Install:** `agentstack add skill-tabooharmony-roblox-brain-roblox-data`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [TabooHarmony](https://agentstack.voostack.com/s/tabooharmony)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [TabooHarmony](https://github.com/TabooHarmony)
- **Source:** https://github.com/TabooHarmony/roblox-brain/tree/main/skills/roblox-data

## Install

```sh
agentstack add skill-tabooharmony-roblox-brain-roblox-data
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Roblox Data Persistence Reference

## 1. Overview

Data persistence in Roblox means saving player progress so it survives across sessions. Every time a player joins, the server loads their data from the cloud; every time they leave (or periodically), it saves back.

**When data flows:**

```
Player Joins  -->  Server loads from DataStore  -->  Populate in-game objects
Player Plays  -->  Data lives in server memory   -->  Auto-save on interval
Player Leaves -->  Server saves to DataStore     -->  Data persists for next session
```

**Data architecture decisions:**

| Approach | Best For | Complexity |
|----------|----------|------------|
| Raw DataStoreService | Simple games, prototypes | Low |
| **ProfileStore** | **Production games (USE THIS)** | Medium |
| Custom wrapper | Specific advanced requirements | High |

> **Use ProfileStore for any game that will ship.** Raw DataStore examples in sections 2-3 exist to explain the underlying system. Do NOT implement manual auto-save, session locking, BindToClose handlers, or retry logic - ProfileStore handles all of this automatically. Section 4 is the production pattern.

**Prerequisite:** Enable API Services in Roblox Studio under **Game Settings > Security > Enable Studio Access to API Services**. Without this, DataStore calls will fail in Studio testing.

---

## Quick Reference

**Load Full Reference below only when you need specific implementation examples or migration patterns.**

Key rules:
- ALWAYS use ProfileStore for player data. Never raw DataStoreService for mutable player state.
- Session locking prevents data corruption from multi-server joins. ProfileStore handles this.
- BindToClose is MANDATORY. Flush all pending saves on server shutdown.
- Schema: use a default template table. New fields get default values automatically.
- Access pattern: `profile.Data.fieldName`. Mutate directly, ProfileStore auto-saves.
- Release profile on PlayerRemoving: `profile:Release()`
- OrderedDataStore for leaderboards only (separate from player data).
- Data migration: version field in schema, migrate on load if version < current.
- Never store Instances or functions in DataStores. Serialize to primitives.
- Cross-server: MessagingService for real-time, GlobalDataStore for shared state.
**Need more detail?** Load `references/full.md` for the complete reference with code examples, API tables, and edge cases.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [TabooHarmony](https://github.com/TabooHarmony)
- **Source:** [TabooHarmony/roblox-brain](https://github.com/TabooHarmony/roblox-brain)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-tabooharmony-roblox-brain-roblox-data
- Seller: https://agentstack.voostack.com/s/tabooharmony
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
