Why aren't these animations playing?

Me and my friend are working on a game and in one part of the game, its supposed to play an animated cutscene. Since this was my friend’s game, he exported the animations and sent me the IDs so I could code them in. When I played the cutscene, the animations dont play. In the cutscene, a giant zombie is supposed to appear and then push over the buildings. Both the zombie and the buildings are supposed to play animations

Here is the script:

local zomanim = game.Workspace.BigZombie.Humanoid:LoadAnimation(script.ZombiePush)
local buildingsanim = game.Workspace.BuildingsRig.AnimationController:LoadAnimation(script.BuildingsFall)

wait(5)
print("cutscene playing")
--cutscene will play

zomanim:Play()
buildingsanim:Play()

game.ReplicatedStorage.BigZombieCutscene:FireAllClients()
game.Workspace.Music_Sounds.Stomp.TimePosition = 0.4
game.Workspace.Music_Sounds.Stomp.Volume = 1
game.Workspace.Music_Sounds.Stomp:Play()
wait(0.65)
game.Workspace.Music_Sounds.Stomp.TimePosition = 0.4
game.Workspace.Music_Sounds.Stomp.Volume = 1
game.Workspace.Music_Sounds.Stomp:Play()
wait(1.4-0.65)
game.Workspace.Music_Sounds.Stomp.TimePosition = 0.4
game.Workspace.Music_Sounds.Stomp.Volume = 1
game.Workspace.Music_Sounds.Stomp:Play()
wait(1.68-1.4)
game.Workspace.Music_Sounds.Stomp.TimePosition = 0.4
game.Workspace.Music_Sounds.Stomp.Volume = 1
game.Workspace.Music_Sounds.Stomp:Play()
wait(2.7-1.6)
game.Workspace.Music_Sounds.ZombieGrowlEcho:Play()
wait(3.66-2.7)
game.Workspace.Music_Sounds.BuildingFall2:Play()
wait(5-3.66)
game.Workspace.Music_Sounds.BuildingFall:Play()
buildingsanim:Stop(999999999999999999999999999999999999999999999999999999999999999)

(there are a bunch of 9s in the stop thing on the last line because the buildings are supposed to fall and stay down. I dont know if theres a better way to do it without making them stay down in the animation)

And here is what happens:

I really doubt that this is a scripting problem because there are no errors in the output and I tried it with a roblox-made animation and it worked perfectly fine. The problem is in the animations but I dont know what it is.

1 Like

I believe you have to publish the animations to play them.

Thats what my friend did. He said that he clicked on the Publish to Roblox button. I have the IDs and everything

You have to publish the animations under your account then you the new animation ID that you published with your account.

hey, good work ;D

as the other guy said, whoever owns the game has to publish it to their account, or if its a group game you publish it to the group

you could also try and see if it works in-game because sometimes it doesnt work in studio

also, is the building animation looped? you might wanna make sure it isnt, im not exactly sure what you mean by them “not staying down” but that might be the workaround for all those nines lol

have you tried the exact same animation with just like a normal rig?
if it doesnt work, then it might be an issue with your code, or just the animation?

1 Like

It seems to work ingame so ill mark this as the solution

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.