Skip to content

DataStoreService

Supported Class Services NotCreatable NotReplicated Service

A game service that gives access to persistent data storage across places in a game.

Note: Backed by the platform persistence service. Core DataStore workflows are supported; request-budget and newer option objects are not.

4 Nova members · 4 modern Roblox members not implemented yet

Description

DataStoreService exposes methods for getting GlobalDataStore and OrderedDataStore objects. Data stores can only be accessed by game servers, so you can only use DataStoreService within a Script or a ModuleScript that is used by a Script.

See Data stores for an in-depth guide on data structure, management, error handling, limits, and more.

Inheritance

Object → Instance → DataStoreService

Nova inheritance: Instance → DataStoreService

Properties

LegacyNamingScheme Supported Property
LegacyNamingScheme: bool

No description available.

Security: LocalUserSecurity

Roblox documentation

Methods

GetDataStore Supported Function Creates a DataStore instance with the provided name and scope.
DataStoreService:GetDataStore(string name, string scope = global): Instance

This function creates a DataStore instance with the provided name and scope. Subsequent calls to this method with the same name/scope will return the same object.

Using the scope parameter will restrict operations to that scope by automatically prepending the scope to keys in all operations done on the data store. This function also accepts an optional DataStoreOptions instance which includes options for enabling AllScopes. See Versioning, listing, and caching for details on scope.

Roblox reference signature
DataStoreService:GetDataStore(name: string, scope: string = global, options: Instance = nil): DataStore
Nova note: Routes through the platform persistence backend.

Roblox documentation

GetGlobalDataStore Supported Function Returns the default data store.
DataStoreService:GetGlobalDataStore(): Instance

Returns the default data store.

This function returns the default GlobalDataStore. If you want to access a specific named data store instead, you should use the GetDataStore() function.

Note that the DataStore returned by this function always uses the scope u. See Data stores for details on scope.

Roblox reference signature
DataStoreService:GetGlobalDataStore(): DataStore
Nova note: Legacy single-store mode; still supported by the persistence backend.

Roblox documentation

GetOrderedDataStore Supported Function Get an OrderedDataStore given a name and optional scope.
DataStoreService:GetOrderedDataStore(string name, string scope = global): Instance

Get an OrderedDataStore given a name and optional scope.

This method returns an OrderedDataStore, similar to the way GetDataStore() does with GlobalDataStores. Subsequent calls to this method with the same name/scope will return the same object.

Roblox reference signature
DataStoreService:GetOrderedDataStore(name: string, scope: string = global): OrderedDataStore

Roblox documentation

Inherited members

Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.

4 modern Roblox member(s) are not implemented yet — expand to inspect

Members declared by Roblox's DataStoreService class (or by a missing base class) that Nova does not expose. Use this list to scope a migration; the compatibility guide has the recommended workaround.

Properties

Member Signature Status Notes Flags
AutomaticRetry AutomaticRetry: bool Not yet — NotReplicated, LocalUserSecurity

Methods

Member Signature Status Notes Flags
GetRequestBudgetForRequestType DataStoreService:GetRequestBudgetForRequestType(requestType: DataStoreRequestType): int Not yet Returns the number of requests that can be made by the given request type. —
ListDataStoresAsync DataStoreService:ListDataStoresAsync(prefix: string, pageSize: int = 0, cursor: string): DataStoreListingPages Not yet Returns a DataStoreListingPages object for enumerating through all of the experience's data stores. Yields
SetRateLimitForRequestType DataStoreService:SetRateLimitForRequestType(requestType: DataStoreRequestType, baseLimit: int, perPlayerLimit: int): null Not yet Sets the rate limit for a given request type per minute. —

Roblox reference: DataStoreService

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.