How to fix the "Cannot load the AnimationClipProvider Service." error

Many people, including myself, have run into this error. I haven’t found any working solutions on the DevForum, and I spent days trying to figure out how to fix this. Today I ended up figuring it out, and I decided to post it here.

Code that would error like this:

local players = game:GetService('Players')

local animationId = 13571756345
local animation = Instance.new('Animation')
animation.AnimationId = 'rbxassetid://'.. animationId

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild('Humanoid')
		local animator = humanoid:WaitForChild('Animator')
		
		local animationTrack = animator:LoadAnimation(animation)
		animationTrack:Play()
	end)
end)

Simple fix:
Add

game:GetService('RunService').Stepped:Wait()

before you load the animation.

Example:

local players = game:GetService('Players')

local animationId = 13571756345
local animation = Instance.new('Animation')
animation.AnimationId = 'rbxassetid://'.. animationId

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild('Humanoid')
		local animator = humanoid:WaitForChild('Animator')
		
		game:GetService('RunService').Stepped:Wait()
		local animationTrack = animator:LoadAnimation(animation)
		animationTrack:Play()
	end)
end)

Secondly, I have seen this alternative method recently. If the above method doesn’t work for you, try this tutorial: https://www.youtube.com/watch?v=iW6A1DkRY7w

I hope this helps!

34 Likes

please put three backticks for the code (```)

```lua
-- put some code here
```

and it becomes this

-- put some code here
4 Likes

okay, thank you! I have been wondering how to do that.

3 Likes

Thank you! It helped me a lot!

3 Likes

You could also just wait for the character to load before playing the animation:

local character = game.Workspace:WaitForChild(player.Name)
1 Like

It depends what you are using this for, but that could work for some people.

better way:

local character = player.CharacterAdded:Wait()

OR

player.CharacterAppearanceLoaded:Wait()
2 Likes

No, see, that doesn’t work, because it sometimes fires before the character’s animator is loaded.

4 Likes

it depends on what the people are using the animation for and when they are trying to load it, but that could work for some people.

Thank you so much! It fixed the problem :slight_smile:

1 Like

Thank you! This helped so much.

Well it fixed the error, but the animation still doesn’t play sometimes

That is a terrible idea, what if they have the same name as some other object in the workspace?

Same exact problem as DOORS and nobody complains about it, also you replied to an answer from a year ago lol

Thank you!

In my opinion, this feels like a hacky solution.

2 Likes

I got this error as well. However, I think it occurs due to the animation trying to be loaded on an object that is not a descendant of the workspace.

1 Like

The problem is actually about the AnimationClipService not loading and trying to use a service that hasnt loaded yet makes problems.

Adding a comment here because this comes up in google when you search it.

My case was not the same as the OP, but was very similar to the YT Video. What was happening in my case was a connection that should have been disconnected by Maid never got added to Maid.

I had it setup so the StateTracker maided the connection, and almost all references to the character / character-specific connections got maided, but the StateTracker itself never got maided so none of the tracked connections got disconnected.

This was similar to the case in the YT Video in that I had a Character that had been destroyed, and animator:LoadAnimation() was being called on the Character post-destroy. So for anyone using single-script-architecture, beware, this could note a memory leak.

1 Like

Thanks for adding that! This should help more people :smiley: