PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GlobalDataStore

Show deprecated

GlobalDataStore

Show deprecated

A GlobalDataStore exposes functions for saving and loading data for the DataStoreService.

See the Articles/Data store|Data Stores article for an in-depth guide on data structure, management, error handling, etc.

Properties

Functions

Variant

GetAsync ( string key )

[Yields]

Returns the value of the entry in the data store with the given key

Variant

IncrementAsync ( string key , int delta )

[Yields]

Increments the value of a particular key and returns the incremented value

RBXScriptConnection

OnUpdate ( string key , Function callback )

Sets callback as a function to be executed any time the value associated with key is changed

Variant

RemoveAsync ( string key )

[Yields]

Removes the given key from the data store and returns the value associated with that key

void

SetAsync ( string key , Variant value )

[Yields]

Sets the value of the key. This overwrites any existing data stored in the key.

Tuple

UpdateAsync ( string key , Function transformFunction )

[Yields]

Retrieves the value of a key from a data store and updates it with a new value

Events