Roblox Wiki
Roblox Wiki
36,934
pages

Exposes functions for saving and loading data for the Light service iconDark service iconDataStoreService. This class was added in version 0.128.

Methods

GetAsync(key: string, options: DataStoreGetOptions = nil): Tuple

  • YieldsThis function can yield the script it is used in.
Parameters
NameTypeDefault
keystring
optionsDataStoreGetOptionsnil
  • Thread safety: unsafe

IncrementAsync(key: string, delta: int = 1, userIds: Array = {}, options: DataStoreIncrementOptions = nil): Variant

  • YieldsThis function can yield the script it is used in.
Parameters
NameTypeDefault
keystring
deltaint1
userIdsArray{}
optionsDataStoreIncrementOptionsnil
  • Thread safety: unsafe

OnUpdate(key: string, callback: Function): RBXScriptConnection

  • DeprecatedThis member will be phased out and should be avoided while it is still available.
Parameters
NameType
keystring
callbackFunction
  • Thread safety: unsafe

RemoveAsync(key: string): Tuple

  • YieldsThis function can yield the script it is used in.
Parameters
NameType
keystring
  • Thread safety: unsafe

SetAsync(key: string, value: Variant, userIds: Array = {}, options: DataStoreSetOptions = nil): Variant

  • YieldsThis function can yield the script it is used in.
Parameters
NameTypeDefault
keystring
valueVariant
userIdsArray{}
optionsDataStoreSetOptionsnil
  • Thread safety: unsafe

UpdateAsync(key: string, transformFunction: Function): Tuple

  • YieldsThis function can yield the script it is used in.
Parameters
NameType
keystring
transformFunctionFunction
  • Thread safety: unsafe

Removed members

External links[]