Roblox UtilitiesDevlHub Roblox Documentation

Class

KeyframeSequenceProvider

NotCreatableServiceNotReplicatedDeprecated
Inherits
Instance › Object
Memory category
Animation

Provides functions to load and preview KeyframeSequence.

Deprecated. This service is deprecated and does not support the newer AnimationClip. It's recommended to use AnimationClipProvider instead.

The KeyframeSequenceProvider service provides functions to load and preview KeyframeSequences. It includes a number of functions that are useful when working with Animations.

A KeyframeSequence stores a series of Poses that encode the hierarchy and motion of an animation. The animation data Roblox uses in the playback of an animation, referenced by the Animation.AnimationId property, can be constructed from a KeyframeSequence. KeyframeSequences are usually created by the Roblox Animation Editor but can be created through other plugins or even manually.

Methods 7#

GetAnimationsThis function returns an InventoryPages object which can be used to iterate over animations owned by a specific user.Yields
GetAnimationsAsyncThis function returns an InventoryPages object which can be used to iterate over animations owned by a specific user.Yields
GetKeyframeSequenceReturns a KeyframeSequence from a given asset URL.PluginSecurity securityDeprecated
GetKeyframeSequenceAsyncReturns a KeyframeSequence based on the specified assetId asynchronously.Yields
GetKeyframeSequenceByIdReturns a KeyframeSequence from the supplied assetId.PluginSecurity securityDeprecated
RegisterActiveKeyframeSequenceGenerates a temporary asset ID from a KeyframeSequence that can be used for localized testing of an animation. Generates an active:// URL.
RegisterKeyframeSequenceGenerates a temporary asset ID from a KeyframeSequence that can be used for localized testing of an animation. Generates a hash.

GetAnimations(userId: User): Instance#

YieldsDeprecated

This function returns an InventoryPages object which can be used to iterate over animations owned by a specific user.

NameTypeDefaultDescription
userIdUserThe user ID of the user.
Returns

GetAnimationsAsync(userId: User): Instance#

Yields

This function returns an InventoryPages object which can be used to iterate over animations owned by a specific user.

This function has a number of potential uses, such as allowing users to browse and import animations into a custom animation plugin.

NameTypeDefaultDescription
userIdUserThe user ID of the user.
Returns

GetKeyframeSequence(assetId: ContentId): Instance#

DeprecatedPluginSecurity securityDeprecated

Deprecated. This function is deprecated and can lead to the game freezing until the animation is loaded. Developers are recommended to use KeyframeSequenceProvider:GetKeyframeSequenceAsync() instead.

Returns a KeyframeSequence from a given asset URL.

NameTypeDefaultDescription
assetIdContentIdThe content ID of the animation.
Returns

GetKeyframeSequenceAsync(assetId: ContentId): Instance#

Yields

GetKeyframeSequenceAsync returns a KeyframeSequence based on the specified assetId. The assetId must correspond to an animation. The function will yield until the KeyframeSequence is loaded from the website. Because this is a webcall it should wrapped in a pcall.

NameTypeDefaultDescription
assetIdContentIdThe content ID of the animation.
Returns

GetKeyframeSequenceById(assetId: int64, useCache: boolean): Instance#

DeprecatedPluginSecurity securityDeprecated

Deprecated. This function is deprecated and can lead to the game freezing until the animation is loaded. Developers are recommended to use KeyframeSequenceProvider:GetKeyframeSequenceAsync() instead.

Returns a KeyframeSequence from the supplied assetId. Can optionally cache to reduce unnecessary loading freezes.

NameTypeDefaultDescription
assetIdint64The content ID of the animation.
useCachebooleanTrue if a cached version can be returned.
Returns

RegisterActiveKeyframeSequence(keyframeSequence: Instance): ContentId#

Generates a temporary asset ID from a KeyframeSequence that can be used for localized testing of an animation.

This function performs the same function to KeyframeSequenceProvider:RegisterKeyframeSequence() however this function generates an active:// URL instead of a hash.

The ID generated can be used in an Animation.AnimationId property for testing.

The asset ID generated by this function is temporary and cannot be used outside of Studio. Developers wishing to generate an asset ID that can be used online should upload the KeyframeSequence to Roblox.

NameTypeDefaultDescription
keyframeSequenceInstanceThe KeyframeSequence to be used.
Returns
  • ContentId — A temporary asset ID generated for localized animation playback.

RegisterKeyframeSequence(keyframeSequence: Instance): ContentId#

Generates a temporary asset ID from a KeyframeSequence that can be used for localized testing of an animation.

This function performs the same function to KeyframeSequenceProvider:RegisterActiveKeyframeSequence() however this function generates a hash instead of an active:// URL.

The ID generated can be used for the Animation.AnimationId property to test animations.

The asset ID generated by this function is temporary and cannot be used outside of Studio. Developers wishing to generate an asset ID that can be used online should upload the KeyframeSequence to Roblox.

NameTypeDefaultDescription
keyframeSequenceInstanceThe KeyframeSequence to be used.
Returns
  • ContentId — A temporary asset ID generated for localized animation playback.

Inherited members#

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

ClassName, className

Events (1)

Changed