local animation = workspace["animation"] local track = workspace.Dummy.Humanoid:LoadAnimation(animation) while true do wait(1.05) track:Play() end
The error i get is
17:05:01.728 - LoadAnimation requires an Animation object 17:05:01.774 - Stack Begin 17:05:01.775 - Script 'Workspace.Script', Line 2 17:05:01.776 - Stack End
This is because im using a keyframesequence instead of a normal animation. and i dont wanna export the animation to roblox.
-- 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