I’m making an animation, but when uploading using the KeyframeSequenceRegistrator, only animation 2 is created and it says that animation 1 ID is empty. Here’s my code:
local part1KS = game:GetService("KeyframeSequenceProvider"):RegisterKeyframeSequence(game.Workspace.FirstAnimPart1)
local part2KS = game:GetService("KeyframeSequenceProvider"):RegisterKeyframeSequence(game.Workspace.FirstAnimPart2)
local anim1 = Instance.new("Animation")
anim1.Parent = game.Workspace
anim1.Name = "Animation1"
anim1.AnimationId = part1KS
local anim2 = Instance.new("Animation")
anim1.Parent = game.Workspace
anim1.Name = "Animation2"
anim1.AnimationId = part2KS
local animator = script.Parent.Humanoid:FindFirstChildOfClass("Animator")
if animator then
local part1 = animator:LoadAnimation(anim1)
local part2 = animator:LoadAnimation(anim2)
part1:Play()
part1.Stopped:wait()
part2:Play()
end
Thanks for stopping by to help! Also the ID isn’t empty, I printed it out.