"Animation failed to load"

I made several animation tools that can be divided in two categories. Some are looped animations, the others are just playing once. Here’s an image of my Workspace:


The Animation always contains the AnimationId (e.g. rbxassetid://4264422248)
Now to my problem: All looped animations only load in Studio while all non-looped animations only load in actual Roblox. Here some Pics of my scripts:

Looped Animation script:

Non-Looped Animation script:

Is this just a scripting mistake or really a bug?

Help appreciated!

:crown: Nova_MrRoyal :crown:

I’m not sure if this still happens but what I think is happening is when you do LoadAnimation() it takes a few seconds to actually load, so when u attempteed to play it it didn’t work because it didn’t load yet

I would recommand to preload the animation then play it

local Character = nil; while Player.Character == nil or Player.Character.Parent == nil do wait() end Character = Player.Character
local Humanoid = Character:WaitForChild(“Humanoid”)
local Track = Humanoid:LoadAnimation(script:WaitForChild(“Animation”))

– if your wondering why i didnt use characteradded:Wait() its because i need the character parented under workspace
– tool event function thingy

1 Like

No that was not the problem. I had an error in the output where it said ‘Animation failed to load’

do you own the animation? aswell as did you make sure the Id was correct

1 Like

I believe the variable for the AnimationTrack only needs to be assigned once at the start of the script. And instead of destroying it, just call :Stop()

And Try to use the AnimationTrack.Looped property instead of a repeat until loop. You can find it here > https://developer.roblox.com/en-us/api-reference/property/AnimationTrack/Looped

A “failed to load error” means that the asset isn’t approved for the game. For an animation to load on a game it must have been created by the game owner, or in the game owners inventory.

I created it, but I’m not the Owner. Is this also a problem?

Yes I own the animation and Yes the Id is correct. I checked it a thousand times

You have to be the owner of the animation or, if your working on a group place then the group must own the animation