Skip to content

Class · inherits AnimationClip

KeyframeSequence

Official docs ↗

This object stores all of the Keyframes and other data for the animation.

About KeyframeSequence

KeyframeSequence stores all the Keyframes for an Animation, determines if the animation will Loop, and determines its Priority against other animations. The last Keyframe in the sequence, meaning the Keyframe with the highest Time property, determines the length of an animation.

Although Priority and Loop save the priority and looped animation settings for the sequence, note that AnimationTrack properties can eventually overwrite these properties at playback time.

If you want to preview an Animation before uploading it to Roblox, you can generate a temporary hash ID using KeyframeSequenceProvider.RegisterKeyframeSequence for localized animation testing.

Obtaining Sequences

In some cases you may wish to download the KeyframeSequence corresponding to an existing uploaded Animation. You can use AnimationClipProvider.GetAnimationClipAsync to download an animation.

Properties 1

  • AuthoredHipHeight: floatPluginHiddenContains the hip height of the Humanoid of the model that was used to author this KeyframeSequence.

    Contains the hip height of the Humanoid of the model that was used to author this KeyframeSequence. Default value is 1.35 since that is the hip height set for a standard R15 character.

Methods 3

  • AddKeyframe(keyframe: Instance) → ()Adds a Keyframe to the KeyframeSequence by parenting it to the KeyframeSequence.

    This method adds a Keyframe to the KeyframeSequence by parenting it to the KeyframeSequence. It is functionally identical to setting the keyframe's Instance.Parent to the KeyframeSequence.

    Note that this method will not error when called with an instance other than a Keyframe as the keyframe parameter and will parent it successfully.

  • GetKeyframes() → List<Keyframe>Returns an array that contains all Keyframes contained in a KeyframeSequence.

    This method returns an array that contains all Keyframes that have been added to a KeyframeSequence.

  • RemoveKeyframe(keyframe: Instance) → ()This method removes a Keyframe from the KeyframeSequence by setting its parent to nil.

    This method removes a Keyframe from the KeyframeSequence by setting its parent to nil. It is functionally identical to setting the keyframe's parent to nil.

    Note that while this sets the keyframe's parent to nil, it does not destroy it. Provided another reference to the keyframe remains, it can be re-parented later.

    Also note that this method will not error when called with an Instance other than a Keyframe as the keyframe parameter.

KeyframeSequence also has every member of AnimationClip. 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.