Skip to content
Roblox API Reference

DataStoreService

A game service that gives access to persistent data storage across places in a game.
  • Not creatable
  • Not replicated
  • Service
Memory category
Instances
Own members
8
Inherited members
75
Subclasses
0
Siblings
608

Properties25

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined byDataStoreService2

Property categoryBehavior

  • DataStoreService.AutomaticRetry: boolean = true
    • Not replicated
    • Local user security
    • Read capabilities: DataStore
  • DataStoreService.LegacyNamingScheme: boolean = false
    • Deprecated
    • Hidden
    • Local user security
    • Read capabilities: DataStore

Methods48

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byDataStoreService6
  • DataStoreService:GetDataStore(name: string,scope: string? = "global",options: Instance? = nil,): DataStore
    Creates a DataStore instance with the provided name and scope.
    • Capabilities: DataStore
    Parameters
    ParameterDescription
    name: string
    Name of the data store.
    scope: string? = "global"
    (Optional) A string specifying the scope.
    options: Instance? = nil
    (Optional) A DataStoreOptions instance to enable experimental features and v2 API features.
    Returns
    TypeDescription
    DataStore
    A DataStore instance with provided name and optional scope.
  • DataStoreService:GetGlobalDataStore(): DataStore
    Returns the default data store.
    • Capabilities: DataStore
    Returns
    TypeDescription
    DataStore
    The default GlobalDataStore instance.
  • DataStoreService:GetOrderedDataStore(name: string,scope: string? = "global",): OrderedDataStore
    Get an OrderedDataStore given a name and optional scope.
    • Capabilities: DataStore
    Parameters
    ParameterDescription
    name: string
    Name of the ordered data store.
    scope: string? = "global"
    (Optional) A string specifying the scope. Default is "global".
    Returns
    TypeDescription
    OrderedDataStore
    An OrderedDataStore instance with the provided name and scope.
  • DataStoreService:GetRequestBudgetForRequestType(requestType: Enum.DataStoreRequestType): number
    Returns the number of requests that can be made by the given request type.
    • Capabilities: DataStore
    Parameters
    ParameterDescription
    requestType: Enum.DataStoreRequestType
    The DataStoreRequestType to check the budget for.
    Returns
    TypeDescription
    number
    The number of data store requests that can currently be made for the specified request type.
  • DataStoreService:ListDataStoresAsync(prefix: string? = "",pageSize: number? = 0,cursor: string? = "",): DataStoreListingPages
    Returns a DataStoreListingPages object for enumerating through all of the experience's data stores.
    • Yields
    • Capabilities: DataStore
    Parameters
    ParameterDescription
    prefix: string? = ""
    (Optional) Prefix to enumerate data stores that start with the given prefix.
    pageSize: number? = 0
    (Optional) Number of items to be returned in each page. If no value is given, the engine sends a default value of 0 to the data store web service, which in turn defaults to 32 items per page.
    cursor: string? = ""
    (Optional) Cursor to continue iteration.
    Returns
    TypeDescription
    DataStoreListingPages
    DataStoreListingPages instance containing DataStoreInfo instances that provide details such as name, creation time, and time last updated.
  • DataStoreService:SetRateLimitForRequestType(requestType: Enum.DataStoreRequestType,baseLimit: number,perPlayerLimit: number,)
    Sets the rate limit for a given request type per minute.
    • Capabilities: DataStore
    Parameters
    ParameterDescription
    requestType: Enum.DataStoreRequestType
    The DataStoreRequestType to configure the rate limit for.
    baseLimit: number
    The base number of requests allowed per minute regardless of player count.
    perPlayerLimit: number
    The additional number of requests per minute granted for each connected player.

Events10

Inherited fromObject1
Inherited fromInstance9