DataStoreService

DataStoreService : Instance

Overview

Properties

Methods

GetDataStore

The GetDataStore method retrieves a data store object that developers can use to store and manage key-value pairs. The InName parameter specifies the name of the data store, while the InScope parameter determines the scope for the data store. This method is commonly utilized when working with specific categories or subsets of data within a game. The returned data store allows for persistent and structured handling of data across game sessions

Parameters

string InName

string InScope

Currently not supported.

Return

GlobalDataStore

Code Samples

local DataStoreService = game:GetService("DataStoreService") 
local GoldStore = DataStoreService:GetDataStore("PlayerGold")

GetGlobalDataStore

The GetGlobalDataStore method retrieves the default global data store associated with the game universe. This method does not require specifying a name or scope and is suitable for storing and retrieving common or shared data across the entire game. It is a straightforward way to handle universal data that applies to all players or components within the game.

Parameters

Return

GlobalDataStore

Code Samples

local DataStoreService = game:GetService("DataStoreService") 
local GlobalStore = DataStoreService:GlobalDataStore()

GetOrderedDataStore

Currently not supported.

Parameters

string InName

string InScope

Return

OrderedDataStore

Code Samples

ListDataStoresAsync

Currently not supported.

Parameters

string InPrefix

number InPageSize

string InCursor

Return

DataStoreListingPages

Code Samples

Events

See also

Saving & Loading Data

Last updated