Collapse Sidebar




Determines the default priority of an animation created from the KeyframeSequence. Depending on what this is set to, playing multiple animations at once will look to this property to figure out which Keyframe Poses should be played over one another.

When an AnimationTrack has been created from an Animation, its AnimationTrack/Priority property will default to the original KeyframeSequence value. Note this value can be overwritten.

Code Samples

KeyframeSequence Instantiation

This sample demonstrates how a basic KeyframeSequence can be created.

-- create the keyframesequence
local keyframeSequence = Instance.new("KeyframeSequence")
keyframeSequence.Loop = false
keyframeSequence.Priority = Enum.AnimationPriority.Action

--  create a keyframe
local keyframe = Instance.new("Keyframe")
keyframe.Time = 0

-- create sample poses
local rootPose = Instance.new("Pose")
rootPose.Name = "HumanoidRootPart"
rootPose.Weight = 0

local lowerTorsoPose = Instance.new("Pose")
lowerTorsoPose.Name = "LowerTorso"
lowerTorsoPose.Weight = 1

-- set the sequence hierarchy
rootPose:AddSubPose(lowerTorsoPose) -- lowerTorsoPose.Parent = rootPose
keyframe:AddPose(rootPose) -- rootPose.Parent = keyframe
keyframeSequence:AddKeyframe(keyframe) -- keyframe.Parent = keyframeSequence

-- parent the sequence 
keyframeSequence.Parent = workspace