Reference API Roblox

Engine API

Website

Related

Reference API Roblox

KeyframeSequence

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

Member index 4

HistoryMember
573AddKeyframe(keyframe: Instance): null
648GetKeyframes(): Instances
573RemoveKeyframe(keyframe: Instance): null
inherited from AnimationClip
553Loop: bool
553Priority: AnimationPriority
inherited from Instance
553Archivable: bool
670Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
670Sandboxed: bool
680UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
690IsPredicted(): bool
664IsPropertyModified(property: string): bool
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
690SetPredictionMode(mode: PredictionMode): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Removed member index 2

HistoryMember
497Loop: bool
497Priority: AnimationPriority

Description

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.

History 24

Members 4

AddKeyframe

Parameters (1)
keyframeInstance
Returns (1)
null

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.

History 3

GetKeyframes

Parameters (0)
No parameters.
Returns (1)
Instances

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

History 3

RemoveKeyframe

Parameters (1)
keyframeInstance
Returns (1)
null

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.

History 3

Removed members 2

Loop

TypeDefault
bool

History 4

Priority

TypeDefault
AnimationPriority

History 4

Settings