Error - Cannot load the AnimationClipProvider service

I was trying to look for other solutions but this is the only one that worked currently.

3 Likes

Does it only works with a viewmodel? Can’t I do this?:

local lastparent = humanoid.Parent
humanoid.Parent = game.Workspace
local v_idle = humanoid.Animator:LoadAnimation(Idle)
humanoid.Parent = lastparent

Thank you for reading!

1 Like

I found a solution! I had this issue annoyingly enough…

I was using a animation frame with a handler and a template to clone a rig to preview the animations, without having to press on them to see.

BELOW IS THE CODE I USED WITHIN A FOR LOOP OF THE ANIMATIONS

Steps to Solution:

for _,v in pairs(FetchedAnimationInfo) do
	local RigClone = nil
	if v.Rig == "R15" then
		RigClone = game:GetService("ReplicatedStorage"):WaitForChild('Animations').R15Rig:Clone()
	elseif v.Rig == "R6" then
		RigClone = game:GetService("ReplicatedStorage"):WaitForChild('Animations').R6Rig:Clone()
	end
	RigClone.Parent = workspace
	wait()
	local Track = Instance.new("Animation")
	Track.AnimationId = "http://www.roblox.com/asset/?id=" .. v.AnimationID
	local Animation = RigClone.Humanoid.Animator:LoadAnimation(Track)
	Animation.Looped = true
	Animation:Play()
	
	local Clone = Template:Clone()
	Clone.Name = v.Name
	Clone.AnimName.Text = v.Name .. " | " .. v.Rig
	if not Clone.Viewport:FindFirstChildOfClass("Camera") then
		local Camera = Instance.new("Camera")
		Camera.CFrame = CFrame.new(RigClone.HumanoidRootPart.Position + RigClone.HumanoidRootPart.CFrame.LookVector * 7, RigClone.HumanoidRootPart.Position)
		Clone.Viewport.CurrentCamera = Camera
		Camera.Parent = Clone.Viewport.WorldModel
		Clone.Viewport.WorldModel.PrimaryPart = RigClone.HumanoidRootPart
		RigClone.Parent = Clone.Viewport.WorldModel
		RigClone.Name = ""
	end
	Clone.Parent = Container
end

This seemed to work once I loaded in, and only shows across the client so there is absolutely NO server delay.

If you have any questions, feel free to ask!

2 Likes

this kind of works, you can replace your variable where you define your character with this and itll work (at least for me)

2 Likes

I was having this problem and extremely confused by it. Then I realized that a dysfunctional part of the code was accidentally giving players multiple copies of the script which plays the animations, causing the code to be trying to play animations simultaneously due to there being 2 copies of the same script, and fixing this fixed the Animation Clip Provider Service errors.

3 Likes

For anyone facing this problem, it’s typically caused by attempting to load an animation before the AnimationClipProvider service has loaded itself (it’s loaded by CoreScripts), to circumvent this issue you can add a small yield (delay) between the script’s execution starting and the animation loading, i.e;

local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
if not player:HasAppearanceLoaded() then player.CharacterAppearanceLoaded:Wait() end
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local animation = script:WaitForChild("Animation") --Animation placed inside script.
task.wait() --Yield here, increase delay if necessary.
local track = animator:LoadAnimation(animation)
repeat task.wait() until track.Length > 0
track:Play()
11 Likes

While using Studios multiple Clients and Servers Test feature It gave me the same error for every test client that joined. The error was limited to server scripts only so the animations played by test clients were working and i don’t think the issue happened because the server script executed before AnimationClipProvider service has loaded since resetting the test client character gave the same error again
unknown (10)

1 Like

This is true, this is also caused if you try to apply animations onto things currently located in replicatedstorage or in an inanimate service ^

2 Likes

im currently having this issue, anyone else?

3 Likes

put wait() on first line.
trust me.

27 Likes

print(“THANK U THANK YOOYYOYUUUYUUYUYYUUYUYUYUYU”);

3 Likes

To solve the problem, type this before loading the animations:

repeat
        task.wait(1)
until humanoid.Parent.Parent == workspace

the reason of the error is trying to load the animations on the character before it is fully loaded in the workspace, hope this helped.

2 Likes
repeat task.wait(1) until humanoid.Parent.Parent == workspace

also works and saves 2 lines

3 Likes
while humanoid.Parent.Parent ~= workspace do
        task.wait(1)
end

will not make it work.
the reason your code make them work is it must makes all the code wait.
just… what code need is wait() .

4 Likes

This error also happens to me and this was the solution I found:
Put this before the character variable

Player.CharacterAppearanceLoaded:Wait()

1 Like

What? His code does work, however, as it’s a repeat loop, the code will run and the condition later, a while loops runs the condition first.

Also, don’t use ~= workspace or == workspace, since you may use custom character parent (like a folder)

Instead do:

while char.Parent == nil do
       task.wait()
end
1 Like

OH MY GOD THANK YOU

while task.wait (0.01) do
warn("THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU")

end

Hey roblox, i’m looking at you. Please fix this bug.

2 Likes

press like(heart shape) button for me :wink:

10 Likes

Okay so I found a solution to this, however it might not be one for a lot of you guys (I used Promise.lua)

--// My Util Module

local myUtil = {}

local function loadAnimation(hum, anim)
	return Promise.new(function(resolve, reject)
		local animTrack;

		local success, output = pcall(function()
			animTrack = hum:LoadAnimation(anim)
		end)	

		if not success then
			reject()
		else
			resolve(animTrack)
		end
	end)
end

function myUtil:fetchAnimTrack(hum,anim)
	return Promise.retryWithDelay(
		loadAnimation, 5, 1,
		hum, anim
	):expect()
end

return myUtil

This function safely loads any AnimationTracks and returns them.

Just run:

myUtil:fetchAnimTrack(someHumanoid, someAnimationInstance)
9 Likes

This is the solution, thanks! I hope the post author marks your answer. What I did was I made sure to parent my npc to workspace before loading animations!