Roblox UtilitiesDevlHub Roblox Documentation

Class

KeyframeSequence

Inherits
AnimationClip › Instance › Object
Memory category
Animation

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

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#

AuthoredHipHeightfloatContains the hip height of the Humanoid of the model that was used to author this KeyframeSequence.Read: PluginSecurityWrite: PluginSecurityReadSafeHidden

AuthoredHipHeight: float#

HiddenRead: PluginSecurityWrite: PluginSecurityReadSafe

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#

AddKeyframeAdds a Keyframe to the KeyframeSequence by parenting it to the KeyframeSequence.
GetKeyframesReturns an array that contains all Keyframes contained in a KeyframeSequence.
RemoveKeyframeThis method removes a Keyframe from the KeyframeSequence by setting its parent to nil.

AddKeyframe(keyframe: Instance): ()#

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.

NameTypeDefaultDescription
keyframeInstanceThe Keyframe to be added.
Returns
  • ()

GetKeyframes(): List<Keyframe>#

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

Returns

RemoveKeyframe(keyframe: Instance): ()#

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.

NameTypeDefaultDescription
keyframeInstanceThe Keyframe to be removed.
Returns
  • ()

Inherited members#

Inherited from AnimationClip 3
Properties (3)

Length, Loop, Priority

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

ClassName, className

Events (1)

Changed