Class
KeyframeSequence
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#
AuthoredHipHeightfloat | Contains 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#
| AddKeyframe | Adds a Keyframe to the KeyframeSequence by parenting it to
the KeyframeSequence. |
| GetKeyframes | Returns an array that contains all Keyframes contained in
a KeyframeSequence. |
| RemoveKeyframe | This 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.
Returns
()
GetKeyframes(): List<Keyframe>#
This method returns an array that contains all Keyframes
that have been added to a KeyframeSequence.
Returns
List<Keyframe>— An array ofKeyframes.
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.
Returns
()
Inherited members#
Inherited from AnimationClip 3
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild