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
try this to play the animation.
local Anim = script:WaitForChild("Animation") local s = player.Character.Humanoid:LoadAnimation(Anim) s:Play()
and put the animation inside the script and name it "Animation" and make sure you EXPORTED the animation!