Skip to content

Class · inherits Instance

DataStoreOptions

Official docs ↗

Object used to provide additional parameters to DataStoreService.GetDataStore.

About DataStoreOptions

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

  • AllScopes: booleanWhether the GlobalDataStore should work with all scopes.

    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

  • SetExperimentalFeatures(experimentalFeatures: Dictionary) → ()Currently has no observable effect on data store behavior.

    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.

DataStoreOptions also has every member of Instance. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.