I’ve got 2 models, which are buildings, that each have an animation that plays after a certain period of time. However, if both of these buildings are chosen to play their animation, of falling over, then only the 1st building animation plays but the 2nd building animation doesn’t, even though it’s just 1 second after the first one.
So far it works if only 1 of the 2 buildings has been chosen to play their animation but I wanted both to play alongside each other, if they are both chosen.
script for 1st building
local animation = script:WaitForChild('Animation')
local humanoid = script.Parent.AnimationController
local dance = humanoid:LoadAnimation(animation)
local Collapse = math.random(1,2)
while true do
wait (2)
if Collapse == 1 then
wait(45)
dance:Play()
print ("Building 1 Going Down")
wait(10)
dance:AdjustSpeed(0)
return
end
if Collapse == 2 then
print ("Building 1 Staying Up")
return
end
end
script for 2nd building
local animation = script:WaitForChild('Animation')
local humanoid = script.Parent.AnimationController
local dance = humanoid:LoadAnimation(animation)
local Collapse = math.random(1,2)
while true do
wait (2)
if Collapse == 1 then
wait(46)
dance:Play()
print ("Building 2 Going Down")
wait(11)
dance:AdjustSpeed(0)
return
end
if Collapse == 2 then
print ("Building 2 Staying Up")
return
end
end