Failed To load animation ID?

Hey yall so I’m having trouble playing my animation. The animation seems to only work for me and anyone else who tried to play the animation they would get this error.

08:44:22.293 - Animation "https://assetdelivery.roblox.com/v1/asset?id=5522694681&serverplaceid=0" failed to load in "Animation.AnimationId": Animation failed to load 

The animation is made by me and I am the owner of the game. We have tested the animation in and out of studio and it does not work for both.

Local Script:

local player = game.Players.LocalPlayer
local character = player.Character
local debounce = true

local animation = Instance.new("Animation")
animation.Parent = tool
animation.AnimationId = "http://www.roblox.com/asset/?id=5522694681"
animation.Name = "swing"

if not character or not character.Parent then
	character = player.CharacterAdded:Wait()
end

tool.Activated:Connect(function()
	local anime = character.Humanoid:LoadAnimation(tool.swing)
	if debounce then
		anime:Play()
		debounce = false
		wait(1)
		anime:Stop()
		debounce = true
	end
end) 

I have also tested using RemoveEvent to fire to the server to play the animation and that does not work either.

Hopefully someone can help because this is bugging me a lot thank you :+1:

2 Likes

You most likely uploaded the animation to your inventory, and you are working in a group, so that when you go in the actual game you get the error? (Just confirm if that statement is true) If so, you need to upload the animation to the group.

6 Likes

Sorry I am still quite new with Team Create, but yes I uploaded the animation to my inventory and I get the error whenever anyone besides me tries to trigger the animation.

Also how do you upload an animation to a group?

1 Like

When you are exporting the animation, there should be a dropdown and it should by default have “me” or “my inventory”, something along those lines. Click the dropdown, and then click the group name that you are working under. And then just get the new animation id, and put it in the script.

4 Likes

Instead of the URL do rbxassetid://141241221 – Whatever your ID is.

Or when you export there should be a ID, just copy that…

1 Like

If your just using one animation you should just create a animation in the tool in studio instead of using scripts to create it, this seems more normal if your only using 1 - 5 animations (i do this all the time with my gun systems and they have 15 animations)

then you just do…

local animation = humanoid:LoadAnimation(script.Parent.Animations.One)
animation:Play()

Your also not loading the animation you have to do humanod:LoadAnimation(animation)

2 Likes