Roblox UtilitiesDevlHub Roblox Documentation

Class

DataStoreOptions

NotReplicated
Inherits
Instance › Object
Memory category
Instances

Object used to provide additional parameters to DataStoreService:GetDataStore().

A configuration object passed as the third argument to DataStoreService:GetDataStore() to customize how the returned DataStore behaves. Create one with Instance.new("DataStoreOptions"), set its properties, then pass it to GetDataStore. Currently the only behavioral property is DataStoreOptions.AllScopes.

Properties 1#

AllScopesbooleanWhether the GlobalDataStore should work with all scopes.ReadSafe

AllScopes: boolean#

ReadSafe

When set to true, the DataStore returned by DataStoreService:GetDataStore() operates across all scopes instead of a single scope. The scope parameter (second argument) to GetDataStore must be an empty string ("") when this property is enabled; passing a non-empty scope throws an error.

In all-scopes mode, every key is prefixed with its scope and a slash separator. For example, DataStore:ListKeysAsync() returns keys such as global/player_data_1234 or houses/house3. When you create or access a key, you must include the scope prefix in the format scope/keyname; omitting the slash throws an error.

Default value is false.

Methods 1#

SetExperimentalFeaturesCurrently has no observable effect on data store behavior.

SetExperimentalFeatures(experimentalFeatures: Dictionary): ()#

Accepts a dictionary of feature-name keys mapped to boolean values and stores them on this DataStoreOptions instance. Calling this method has no observable effect on runtime behavior.

NameTypeDefaultDescription
experimentalFeaturesDictionaryLuau table in key = value format where the key is the experimental feature name and the value is a boolean which specifies whether to enable.
Returns
  • ()

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed