Why cant i play the second animationtrack?

i kinda already know why it wasnt playing

but why cant i just play it

my script look something like this

local module = require(script.Parent:WaitForChild("ModuleScript"))

local animation = script:WaitForChild("Animation")

local animator = script.Parent.Humanoid.Animator

local animationtrack = animator:LoadAnimation(animation)

table.insert(module, animationtrack)

animation.AnimationId = "rbxassetid://4980157533"

local animation1 = script.Animation

local animationtrack2 = animator:LoadAnimation(animation1)

table.insert(module, animationtrack2)

module[2]:Play()
local module = require(script.Parent:WaitForChild("ModuleScript"))
local animation = script:WaitForChild("Animation")
local animator = script.Parent.Humanoid.Animator
local animationtrack = animator:LoadAnimation(animation)

table.insert(module, animationtrack)
animation.AnimationId = "rbxassetid://4980157533"

local animation1 = script.Animation
local animationtrack2 = animator:LoadAnimation(animation1)

table.insert(module, animationtrack2)
module:GetChildren()[2]:Play() --didn't get the children, therefore you're trying to index thru something that isn't a table.

nevermind it was like,

MY Fault

local animator = script.Parent.Humanoid.Animator

local animation = script:WaitForChild("Animation")

local t = {}

table.insert(t, animator:LoadAnimation(animation))

animation.AnimationId = "rbxassetid://7479014100"

table.insert(t, animator:LoadAnimation(animation))

--print(unpack(t))

local animation1, animation2 = unpack(t)

animation1:Play()

wait(4)

animation2:Play()

either the animation priority was set to core because i was using an animation from my old account which had broken animations or i was being stupid and the code did something wrong

anyways everything works with the new script i made

1 Like

@LittleLegender Please mark the topic as solved if there are no more questions.