Engine Class
AnimationClip
Summary
Inherited by
API Reference
Properties
Priority
Code Samples
KeyframeSequence Instantiation
-- Create the sequence
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)
keyframe:AddPose(rootPose)
keyframeSequence:AddKeyframe(keyframe)
-- Parent the sequence
keyframeSequence.Parent = workspace