Skip to content
Roblox API Reference

ContentProvider

Service that is used to load content, or assets, into a game.
  • Not creatable
  • Not replicated
  • Service
Memory category
Instances
Own members
18
Inherited members
75
Subclasses
0
Siblings
608

Properties25

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Defined byContentProvider2

Property categoryData

  • ContentProvider.BaseUrl: string
    Used by the ContentProvider to download assets from the Roblox website.
    • Read only
    • Capabilities: AssetManagement
    • Save only
  • ContentProvider.RequestQueueSize: number
    Gives the number of items in the ContentProvider request queue that need to be downloaded.
    • Read only
    • Capabilities: AssetManagement
    • Save only

Methods57

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 byContentProvider15
  • ContentProvider:GetAssetFetchStatus(contentId: string): Enum.AssetFetchStatus
    Gets the current AssetFetchStatus of the contentId provided.
    • Capabilities: AssetManagement
    Parameters
    ParameterDescription
    contentId: string
    The ID of the content to fetch the status for.
    Returns
    TypeDescription
    Enum.AssetFetchStatus
    The AssetFetchStatus of the content.
  • ContentProvider:GetAssetFetchStatusChangedSignal(contentId: string): RBXScriptSignal
    A signal that fires when the AssetFetchStatus of the provided content changes.
    • Capabilities: AssetManagement
    Parameters
    ParameterDescription
    contentId: string
    The ID of the content to monitor for fetch status changes.
    Returns
    TypeDescription
    RBXScriptSignal
    An RBXScriptSignal that fires when the AssetFetchStatus of the given content changes.
  • ContentProvider:GetDependencyContentIds(root: Instance): { any }
    • Roblox script security
    • Capabilities: AssetManagement
    Parameters
    Parameter
    root: Instance
    Returns
    Type
    { any }
  • ContentProvider:GetDetailedFailedRequests(): { any }
    • Roblox script security
    • Capabilities: AssetManagement
    Returns
    Type
    { any }
  • ContentProvider:GetFailedRequests(): { any }
    • Roblox script security
    • Capabilities: AssetManagement
    Returns
    Type
    { any }
  • ContentProvider:ListEncryptedAssets(): { any }
    Returns an array of the asset IDs that currently have a registered encryption key.
    • Capabilities: AssetManagement
    Returns
    TypeDescription
    { any }
    An array of the asset IDs that currently have an encryption key registered on this ContentProvider.
  • ContentProvider:PreloadAsync(contentIdList: { any },callbackFunction: ((...any) -> ...any)? = nil,)
    Yields until all of the assets associated with the given Instances have loaded.
    • Yields
    • Capabilities: AssetManagement
    Parameters
    ParameterDescription
    contentIdList: { any }
    An array of instances to load.
    callbackFunction: ((...any) -> ...any)? = nil
    The function called when each asset request completes. Returns the content string and the asset's final AssetFetchStatus.
  • ContentProvider:RegisterDefaultEncryptionKey(encryptionKey: string)
    Registers a fallback encryption key used to decrypt any encrypted asset that doesn't have its own key registered.
    • Capabilities: AssetManagement
    Parameters
    ParameterDescription
    encryptionKey: string
    The key to use as the default for decrypting encrypted assets.
  • ContentProvider:RegisterDefaultSessionKey(sessionKey: string)
    Decrypts the provided session key and registers the result as the default encryption key.
    • Capabilities: AssetManagement
    Parameters
    ParameterDescription
    sessionKey: string
    The session-encrypted key to decrypt and register as the default encryption key.
  • ContentProvider:RegisterEncryptedAsset(assetId: string, encryptionKey: string)
    Registers an encryption key used to decrypt a specific encrypted asset.
    • Capabilities: AssetManagement
    Parameters
    ParameterDescription
    assetId: string
    The asset to associate the encryption key with.
    encryptionKey: string
    The key used to decrypt the specified asset.
  • ContentProvider:RegisterSessionEncryptedAsset(contentId: string,sessionKey: string,)
    Decrypts the provided session key and registers it as the encryption key for a specific asset.
    • Capabilities: AssetManagement
    Parameters
    ParameterDescription
    contentId: string
    The asset to associate the decrypted key with.
    sessionKey: string
    The session-encrypted key to decrypt and register for the specified asset.
  • ContentProvider:SetBaseUrl(url: string)
    • Local user security
    • Capabilities: AssetManagement
    Parameters
    Parameter
    url: string
  • ContentProvider:UnregisterDefaultEncryptionKey()
    Clears the default encryption key previously set on the ContentProvider.
    • Capabilities: AssetManagement
  • ContentProvider:UnregisterEncryptedAsset(assetId: string)
    Removes the encryption key registered for a specific asset.
    • Capabilities: AssetManagement
    Parameters
    ParameterDescription
    assetId: string
    The asset whose registered encryption key should be removed.
  • ContentProvider:Preload(contentId: string)
    Deprecated: This item has been superseded by ContentProvider:PreloadAsync() which should be used in all new work.
    Queues an asset to be downloaded by the ContentProvider.
    • Deprecated
    • Capabilities: AssetManagement
    Parameters
    ParameterDescription
    contentId: string
    The content URL of the asset to preload.

    Use PreloadAsync instead.

Events11

Inherited fromObject1
Inherited fromInstance9
Defined byContentProvider1
  • ContentProvider.AssetFetchFailed: RBXScriptSignal<(assetId: string)>
    Fires when the ContentProvider fails to fetch an asset, passing the asset's ID.
    • Capabilities: AssetManagement
    Parameters
    Parameter
    assetId: string