Skip to content

Service · inherits Instance

AnimationClipProvider

Official docs ↗

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 AnimationClip associated with an animation content ID from the Roblox website, regardless of the underlying type of AnimationClip (KeyframeSequence or CurveAnimation).
  • 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 a AnimationClip based on the specified assetId asynchronously.

    Fetches an AnimationClip based on the specified assetId. The assetId must correspond to an animation asset in Roblox. The function will yield until the AnimationClip is loaded from the website and should be wrapped in a pcall.

  • GetAnimationsAsync(userId: User) → InstanceYieldsThis function returns an InventoryPages object which can be used to iterate over animations owned by a specific user.

    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.

  • GetClipEvaluatorAsync(assetId: ContentId) → ClipEvaluatorYieldsReturns a ClipEvaluator for the AnimationClip at the given content ID, loaded asynchronously.

    Fetches the AnimationClip at the specified assetId and returns a ClipEvaluator that wraps it. A ClipEvaluator samples the clip at an arbitrary time to produce an animation pose, so you can read animation data directly instead of playing it back through an Animator.

    The assetId must be an animation asset on Roblox. Yields until the clip is loaded and should be wrapped in a pcall. Loads through the same path as GetAnimationClipAsync, at the local player animation priority.

  • RegisterActiveAnimationClip(animationClip: AnimationClip) → ContentIdGenerates a temporary asset ID from a AnimationClip that can be used for localized testing of an animation.

    Generates a temporary asset ID from a AnimationClip that can be used for localized testing of an animation. This performs the same function as RegisterAnimationClip() but generates an active:// URL instead of a hash. The generated ID can be used as an 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 AnimationClip to Roblox.

  • RegisterAnimationClip(animationClip: AnimationClip) → ContentIdGenerates a temporary asset ID from a AnimationClip that can be used for localized testing of an animation. Generates a hash.

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

    This function performs the same function to RegisterActiveAnimationClip yet 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 AnimationClip to 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.