# roblox-datastores

A DataStoreService reference for Roblox: loading and saving player progress, ordered datastore leaderboards, schema migrations and shutdown-safe auto-save.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 595 installs · ★ 28
- Author: sentinelcore
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/sentinelcore/roblox-skills/tree/HEAD/roblox-datastores/SKILL.md
- Updated: 2026-02-23
- HTML: https://affpapa.org/en/nevibecode/skills/sentinelcore-roblox-datastores

## What it does

The skill feeds your agent a working reference for `DataStoreService` on the server: `GetAsync`, `SetAsync`, `UpdateAsync`, `RemoveAsync`, `GetOrderedDataStore` and `GetSortedAsync`. It ships Lua snippets for the basics — store setup, loading inside `pcall`, a plain save, an atomic counter increment via `UpdateAsync`, and a retry helper with a delay between attempts.

Auto-save gets its own section: `PlayerRemoving` paired with `BindToClose`. Skip the `BindToClose` handler and unsaved sessions vanish when the server shuts down, so this is worth checking if players report rolled-back progress. Versioning is covered too: a `_version` field with migration in the load path, and a new store name like `PlayerData_v2` when the schema breaks.

A mistakes table spells out what goes wrong: datastore calls without `pcall`, saving on every `Changed` event until you hit write limits, handing out default data after a failed load, using `SetAsync` for counters instead of `UpdateAsync`, storing `Instance` or functions. Leaderboard values must be positive integers.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add sentinelcore/roblox-skills --skill roblox-datastores -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/roblox-datastores/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/roblox-datastores/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add sentinelcore/roblox-skills --skill roblox-datastores -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/roblox-datastores/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add sentinelcore/roblox-skills --skill roblox-datastores -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/roblox-datastores/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install sentinelcore/roblox-skills roblox-datastores
```

2. **Manually: put the files in place**
- File: `.github/skills/roblox-datastores/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add sentinelcore/roblox-skills --skill roblox-datastores -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/sentinelcore/roblox-skills --path roblox-datastores
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/roblox-datastores/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add sentinelcore/roblox-skills --skill roblox-datastores -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/sentinelcore/roblox-skills/tree/HEAD/roblox-datastores/SKILL.md

## When to use it
- save and load player progress with DataStoreService
- build a leaderboard on an ordered datastore
- survive server shutdown without losing data
- migrate saves to a new schema version
- trace why players lose progress

## Example prompts
- add auto-save for player progress with DataStoreService
- build a coins leaderboard on an ordered datastore
- rewrite the load path with a migration to version 2

## Similar
- [roblox-server-data](https://affpapa.org/en/nevibecode/skills/roblox-server-data.md) — skill · 1700 installs
- [roblox-game-development](https://affpapa.org/en/nevibecode/skills/roblox-game-development.md) — skill · 2200 installs
- [roblox-luau](https://affpapa.org/en/nevibecode/skills/roblox-luau.md) — skill · 6100 installs
- [roblox-characters](https://affpapa.org/en/nevibecode/skills/roblox-characters.md) — skill · 3600 installs
- [roblox-animation-vfx](https://affpapa.org/en/nevibecode/skills/roblox-animation-vfx.md) — skill · 2300 installs
- [mm2-roblox-analytics-toolkit](https://affpapa.org/en/nevibecode/skills/mm2-roblox-analytics-toolkit.md) — skill · 2400 installs

## Other versions with the same name
- [roblox-datastores · gamedev-skills](https://affpapa.org/en/nevibecode/skills/roblox-datastores.md) — 5700 installs

From the same set: [sentinelcore/roblox-skills](https://affpapa.org/en/nevibecode/by/sentinelcore/roblox-skills.md) — 6 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
