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!

24 Likes

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

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

and it becomes this

-- put some code here
2 Likes

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

1 Like

Thank you! It helped me a lot!

2 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.

3 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.