The animations that I uploaded all worked on my game. I then forwarded that game over to a group game, and the animations that I uploaded no longer work. Though, the animations that I use for the menu uploaded by roblox still work. Any suggestions?
(Both games were Filtering Disabled)
All animations use the same code, though ones only uploaded by ROBLOX work.
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=517348029"
local trackanimation = nil
local playability = true
function playAnimation(AnimationSource)
if playability == true then
local plr = game.Players.LocalPlayer
trackanimation = plr.Character.Humanoid:LoadAnimation(animation)
trackanimation.KeyframeReached:connect(function(kf)
print('Working')
end)
trackanimation:Play()
end
end
script.Parent.MouseButton1Click:connect(playAnimation)
UPDATE: I checked logs and I receive this error:
Animation "http://www.roblox.com/asset/?id=733806517&serverplaceid=739017660" failed to load in "Animation.AnimationId":Animation failed to load

16 comments
you can add clicks and such onto it, this script basically injects the animation from the script into the humanoid then plays it.
I did, it was uploaded to the site and all
Also, the other game has the animations as play-able, is it a configuration error?
strange, try getting an animation track and placing it inside server storage with you animation id, sometimes this stuff happens- this usually happens for my decals though, I've never seen a "playable" function before
Will try
getting an issue with local Anim = game.ServerStorage:WaitForChild("Animation"), it is having trouble find Animation, even though it is visibly there.
Really strange, I use that script for my animations and they work- did you put the animation inside of the script?
No, I put it in ServerStorage.
I defined it in ServerStorage though.
Okay, I tried your way by putting it in the script, and it brought me all the way back to an animation loading error.
do you have the full script? Something is definitely wrong with the animation being exported.
local Anim = script:WaitForChild("Animation") local player = game.Players.LocalPlayer function playAnimation(AnimationSource) local s = player.Character.Humanoid:LoadAnimation(Anim) s:Play() end script.Parent.MouseButton1Click:connect(playAnimation)
using that script you should have the animation inside of the script
Yep, I did. Gave me the error that I got with my original script. I checked my game config, and it's the same as the other game that works with the animations.
Since this is a really weird bug and you provided me with a working, more simplified script, I'll accept your answer.
Sorry man :/ Thanks for the accept!