I want the animation to play when the player clicks, but it doesn't work in a game. It works in Studio and a Test Server.
script.Parent.Activated:connect(function() if debounce then local animationswing = Instance.new("Animation") if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then animationswing.AnimationId = "rbxassetid://886800502" --put animation id here else animationswing.AnimationId = "rbxassetid://886799196" end local animiTrack = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(animationswing) if mouse.Target:FindFirstChild('Breakable') then if (game.Players.LocalPlayer.Character.HumanoidRootPart.Position - mouse.Target.Position).magnitude <= 16 then if mouse.Target.Parent ~= workspace.Resources then local mousetarget = mouse.Target debounce = false animiTrack:Play() animiTrack:AdjustSpeed(stats["Speed"]) animiTrack.KeyframeReached:connect(function(kf) if kf == "End" then script.Parent.Server:FireServer(mousetarget, stats) debounce = true end end) end end end end end)
This is in a local script.
Output:
Animation "http://www.roblox.com//asset?id=886799196&serverplaceid=871165592" failed to load in "Animation.AnimationId": Animation failed to load
I tried answering you on the chat but you were offline. Make sure your animation is created by you, or is in the group creations. The Anim, must be own by you or the group depending on the game you are making either it be a game made by you, or a game in a group.
(edited)
Hope this helps, it's how I fixed my animation problems.