Failed to load animation - sanitized ID

Hi! I’m experimenting around with some stuff and found that literally any animation I made would give me this error:
EDIT: SOLVED, I WASN’T THE OWNER OF THE GAME

Failed to load animation - sanitized ID

I have no clue what I’m doing wrong. The instance is in workspace when I load the animation, it’s a local script inside StarterCharacterScripts, and I’m loading an animation object. Here is a simple script I created to showcase this error:

wait(1)
local playAnim = script.Parent:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(script:WaitForChild("DoubleJump"))

local function PlayAnim()
    playAnim:Play()
end

game:GetService("ContextActionService"):BindAction("Test", PlayAnim, false, Enum.KeyCode.G)

Here’s what I get in the output:

Failed to load animation - sanitized ID: rbxassetid://15302920633

I also tried to import the animation I created back into the animation Editor, and it popped up with this…
image
Anybody know what I’m doing wrong?
PS: I did read about it and all the answers I found were that it was an issue on roblox’s side. I don’t think this is possible as this has been happening for months for me.

1 Like

Either you don’t own the animation or you’re not giving the humanoid’s animator enough time to load.
If it’s neither of those things, I’m not really sure what it could be.

It’s neither of those. I tried a wait(6), but that didn’t do anything. I also tried re-publishing the animation, but to no luck

Ive had this warning where i load the anim (created by me) and it didn’t play

I got that error too sometimes, sometimes you have to wait.maybe a day.

1 Like

Your script appears to be set up correctly for playing an animation, but there’s one potential issue that could cause the “Failed to load animation - sanitized ID” error. This error often occurs when there’s a problem with the animation asset, its ID, or the asset loading process. Here’s what you can do to ensure that the script works as intended:

Step 1: Verify Animation Asset

Make sure that the animation asset named “DoubleJump” exists in your game and is correctly named. You can check this by searching for the animation in the Explorer panel of Roblox Studio. Also, ensure that you are using the correct name in your script.

Step 2: Asset ID

Confirm that the Asset ID of the animation is correct. You should use the Asset ID associated with the “DoubleJump” animation.

Step 3: Permissions

Ensure that the animation asset is not set to private and that you have permission to access it. The asset should be available and not restricted in any way.

Step 4: Script Location

Double-check that your script is placed correctly within your game structure. It should have access to the “Humanoid” and “Animator” objects within the character.

Step 5: Error Handling

You might want to add error handling to your script to better understand what’s going wrong. For example, you can use pcall to catch any potential errors and print them to the output for debugging purposes.

Here’s an updated script with error handling:

wait(1)
local success, playAnim = pcall(function()
    local humanoid = script.Parent:WaitForChild("Humanoid")
    local animator = humanoid:WaitForChild("Animator")
    local animation = script:WaitForChild("DoubleJump")
    
    return animator:LoadAnimation(animation)
end)

if success then
    local function PlayAnim()
        playAnim:Play()
    end
    
    game:GetService("ContextActionService"):BindAction("Test", PlayAnim, false, Enum.KeyCode.G)
else
    warn("Failed to load animation: " .. playAnim)
end

This script wraps the loading of the animation in a pcall to capture any potential errors. If an error occurs, it will be displayed in the output, which can help you diagnose the issue. If the animation asset and setup are correct, this script should work as expected.

2 Likes

Problem is, I get it every time I create an animation. It’s just really annoying

1 Like

That doesn’t help at all, but thanks for trying.

1 Like

It’s just how it is. There is really nothing you can change. Also I agree that it is annoying. You, unfortunately, need the patience for that.

1 Like

I got this problem too. I found my solution when I realized I published all my animations on MY account, instead of my group. If you’re developing a game for a group, make sure to check that you aren’t publishing animations to your personal account and vice versa.

1 Like

I’ve gotten this error a couple of times uploading animations to my group, it takes a couple of uploads to get it fully working.

1 Like

I found a solution to this problem, you need to put your animation under a group, even if your game is under ownership of you. Roblox is kinda of stupid. :cry:

3 Likes

Nothing you can do about it other then wait, it is because of roblox moderation the animations must be reviewed. For me, it took a day for them to get through moderation.

1 Like

Hello all, apologies for how frustrating this issue has been… we have also been having trouble narrowing it down to a single root cause. There are actually multiple potential problems going on here, some of which have already been fixed, so please take another look and let us know if you continue to see issues.

  • The ‘sanitized id’ part of the message is new, but it is not a new error, we’re just taking an extra security step to validate the request was truly for an animation asset id.
  • There was a formatting problem with this message update, so it was truncating the id and reporting the wrong/non-existent asset id as a result. This has been fixed.
  • Around the same time, there were some separate issues around content loading that affected animations:
    • Uploads could sometimes get stuck in a long backlog queue to publish, creating the appearance of non-existent assets and/or moderation issues. This has been fixed.
    • There was another issue that was discovered that could cause assets to delay or fail to load. This was just recently addressed (see here)
  • Irrespective of the root issue, the message is not very informative or helpful to understand why the animation asset failed to load. We are working on improvements to that for your benefit (and ours, quite frankly). :slight_smile:
  • Lastly, in some cases there could just be a legitimate permissions issue with the animation, due to privacy issues. The content management team is very aware of these pain points (e.g. wanting to share animations with or across groups) and we plan to have improvements in the near future (as in 2024).

In the meantime, we will improve the error reporting to aid in debugging.

TL;DR - thank you for your patience with this one and please try again in case the recent content loading fixes have addressed the problem. If not, please reply here or to me directly and we will continue to investigate (caveat: many of us will be offline over the next few weeks, so we will respond in early January).

Thanks again!

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.