Skip to Content

DataStore

Persistent per-player storage, partitioned into named stores. Server only.

local DataStore = game:GetService("DataStore")

Writes are flushed automatically on a short interval, when a player leaves and on server shutdown. There is no explicit save call. In Studio test sessions data is held in memory and starts empty. Saved data can be viewed, edited, cleared and exported from the DataStore section of the game's Manage page. See Saving data.

LimitAmount
Stores per game32
Fields per player in one store64
Store and field names1 to 50 characters: letters, digits, spaces, ., - and _
ValuesNumbers, booleans, or strings up to 1000 characters

Methods

GetStore

DataStore:GetStore(name: string): Store

Returns the Store with the given name, creating it on first use. Each store holds an independent set of fields per player.

local stats = DataStore:GetStore("Leaderstats")

On this page