Class · inherits AnimationClip
KeyframeSequence
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 theHumanoidof the model that was used to author thisKeyframeSequence.Contains the hip height of the
Humanoidof the model that was used to author thisKeyframeSequence. Default value is1.35since that is the hip height set for a standard R15 character.
Methods 3
AddKeyframe
(keyframe: Instance) → ()Adds aKeyframeto theKeyframeSequenceby parenting it to theKeyframeSequence.This method adds a
Keyframeto theKeyframeSequenceby parenting it to theKeyframeSequence. It is functionally identical to setting the keyframe'sInstance.Parentto theKeyframeSequence.Note that this method will not error when called with an instance other than a
Keyframeas thekeyframeparameter and will parent it successfully.GetKeyframes
() → List<Keyframe>Returns an array that contains allKeyframescontained in aKeyframeSequence.This method returns an array that contains all
Keyframesthat have been added to aKeyframeSequence.RemoveKeyframe
(keyframe: Instance) → ()This method removes aKeyframefrom theKeyframeSequenceby setting its parent tonil.This method removes a
Keyframefrom theKeyframeSequenceby setting its parent tonil. It is functionally identical to setting the keyframe's parent tonil.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
Instanceother than aKeyframeas 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.