Service · inherits Instance
AnimationClipProvider
Provides functions to load and preview AnimationClips.
About AnimationClipProvider
Provides functions to load and preview AnimationClips.
It includes a number of functions that are useful when working with an
Animation.
The AnimationClipProvider replaces the deprecated
KeyframeSequenceProvider that was used to download KeyframeSequences
by content ID.
The AnimationClipProvider has a number of uses.
- Download the
AnimationClipassociated with an animation content ID from the Roblox website, regardless of the underlying type ofAnimationClip(KeyframeSequenceorCurveAnimation). - Generate a temporary ID to locally preview an animation.
- Fetch the content IDs of animations owned by a particular user.
Methods 5
GetAnimationClipAsync
(assetId: ContentId) → AnimationClipYieldsReturns aAnimationClipbased on the specified assetId asynchronously.Fetches an
AnimationClipbased on the specified assetId. The assetId must correspond to an animation asset in Roblox. The function will yield until theAnimationClipis loaded from the website and should be wrapped in apcall.GetAnimationsAsync
(userId: User) → InstanceYieldsThis function returns anInventoryPagesobject which can be used to iterate over animations owned by a specific user.This function returns an
InventoryPagesobject 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.
GetClipEvaluatorAsync
(assetId: ContentId) → ClipEvaluatorYieldsReturns aClipEvaluatorfor theAnimationClipat the given content ID, loaded asynchronously.Fetches the
AnimationClipat the specifiedassetIdand returns aClipEvaluatorthat wraps it. AClipEvaluatorsamples the clip at an arbitrary time to produce an animation pose, so you can read animation data directly instead of playing it back through anAnimator.The
assetIdmust be an animation asset on Roblox. Yields until the clip is loaded and should be wrapped in apcall. Loads through the same path asGetAnimationClipAsync, at the local player animation priority.RegisterActiveAnimationClip
(animationClip: AnimationClip) → ContentIdGenerates a temporary asset ID from aAnimationClipthat can be used for localized testing of an animation.Generates a temporary asset ID from a
AnimationClipthat can be used for localized testing of an animation. This performs the same function asRegisterAnimationClip()but generates anactive://URL instead of a hash. The generated ID can be used as anAnimationIdproperty 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
AnimationClipto Roblox.RegisterAnimationClip
(animationClip: AnimationClip) → ContentIdGenerates a temporary asset ID from aAnimationClipthat can be used for localized testing of an animation. Generates a hash.Generates a temporary asset ID from a
AnimationClipthat can be used for localized testing of an animation.This function performs the same function to
RegisterActiveAnimationClipyet generates a hash instead of anactive://URL.The ID generated can be used for the
Animation.AnimationIdproperty 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
AnimationClipto Roblox.
AnimationClipProvider 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.