I found this thread, only my question isn’t answered there and I can’t reply to it since it is closed:
The problem is that if you have animations that are 0 length, such as a static pose, you can’t distinguish an unloaded animation from a perfectly fine loaded static pose animation.
So the idea of using Length = 0 is out the window, what else do we have? I have check all of the other properties and none of them seem to be usable to detect the unloaded(failed to load for some reason) animation.
I’m trying to avoid reloading animations if they have loaded correctly, but I can’t find a reliable method to test whether an animation failed to load or not. (which doesn’t give false positives such as flagging zero length animations which are supposed to be zero length)
The ContentProvider service has an event called AssetFetchFailed which tells you what assets have failed to load with their rbx asset id. The service also has a function called GetAssetFetchStatus(contentId) which as it says, returns the asset’s load status.
I’ll see if i can use this, but I’m not sure if this will help me detect the track that has already failed to load(would it just start working at some point)? I mean, the ID is good, it just fails sometimes then gets stuck not playing the animation from then on.
I don’t think it would start working again, but don’t take my word on it. You could use ContentProvider:PreloadAsync() to try loading the asset again. You might not need to load the animation to the humanoid’s animator again unless the failed to load error interrupts your code.
Yeah I might have to give up on this. I think part of my problem is that the server thinks the asset is fine, the client fails to load it (its a server script loading animations onto characters). So I can’t really detect this from the server script in order to trigger a retry of the loadanimation again.
The server will just keep thinking the animation is loaded fine and :play() nothing basically. Unless the player rejoins.