Cannot load the AnimationClipProvider Service?

This is the error that im getting:
image
This is the line of script that the error is emphasising on

local animationtrack = character:FindFirstChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(randomanimation)

This is my full script

local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:wait()
local userinputservice = game:GetService("UserInputService")
local replicatedstorage = game:GetService("ReplicatedStorage")
local cas = game:GetService("ContextActionService")

local punchkey = Enum.KeyCode.F
local debounce = 1
local animationfolder = script.animations:GetChildren()
local canpunch = true

local function punch()
	local Tool = character:FindFirstChildWhichIsA("Tool")
	if Tool then return end
	if canpunch == true then
		local randomanimation = animationfolder[math.random(1, #animationfolder)]
		local animationtrack = character:FindFirstChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(randomanimation)
		replicatedstorage.events.punchevent:FireServer()
		animationtrack:Play()
		canpunch = false
		wait(debounce)
		canpunch = true
	end
end
userinputservice.InputBegan:Connect(function(input, busy)
	if input.KeyCode == punchkey and not busy then
		punch()
	end
end)
cas:BindAction("Punch", punch, true, punchkey)
cas:SetPosition("Punch", UDim2.new(.4, .0, .1, 0))
cas:SetTitle("Punch", "Punch")
cas:GetButton("Punch").Size = UDim2.new(.3, 0, .3, 0)

i dont know if its a studio bug or just me being bad at scripting.

1 Like

Same problem over here and still no solution. I think it is a Roblox Bug!

Still no solution? Seems like this only started happening to lots of people relatively recently.

I’ve contacting Roblox Team since last week and all they did was send me API references links to learn how to script. I’m really upset right now.

In my case, the problem was caused by the simultaneous animation loading and the “solution” was set a random delay between 0 and 2 (and pray that animations would load at different time between that time lapse). The cause can vary.

I found a pretty reliable solution, set your rig’s parent to workspace, load the animation, then set it’s parent back to where it was before.

Example:

local lastParent = rig.Parent
rig.Parent = workspace
local animation = rig.Humanoid:LoadAnimation(randomAnimTrack)
rig.Parent = lastParent

My issue has been with viewportframes so if your rig is already in workspace then I guess it’s wraps…

1 Like

My rig is already in workspace!

1 Like

For me as well, I don’t know what’s going on with roblox right now with animations.

2 Likes

SAme issuie here! This is very frustrating.