Cannot load the AnimationClipProvider Service

When I call this function it shows the error you see above.

function FX:Animate()
	RunService.Stepped:Wait()
	local track = Humanoid.Animator:LoadAnimation(CheckpointAnims.Pray)
	track:Play()
	task.delay(self.PrayCooldown,track.Stop,track)
end

I tried using this post to fix my issue but it didn’t work.

k, I changed it to a RenderStepped and then a Heartbeat and now it only works the first time but when I die it shows the same error again.

Could you provide the rest of the script that pertains to the animation?

Animations can only load while the animator is parented to anything under the workspace, are you sure the character is in the workspace when you load it?

Yeah because im firing an event to the client when I load.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Root = Character:WaitForChild("HumanoidRootPart")
local Humanoid = Character:WaitForChild("Humanoid")

local Assets = ReplicatedStorage.Assets
local Animations = Assets.Animations
local CheckpointAnims = Animations.Checkpoint

local VFX = ReplicatedStorage.VFX
local CheckpointVFX = VFX.Checkpoint


local FX = {}
FX.__index = FX

function FX.new(cd)
	local self = setmetatable({},FX)
	self.PrayCooldown = cd
	self.NewDust = CheckpointVFX.GoldDust:Clone()
	return self
end


function FX:Pray()
	self:Particles()
	self:Animate()
end

function FX:Particles()
	self.NewDust.Position = Root.Position
	self.NewDust.Attachment.ParticleEmitter.Enabled = true
	self.NewDust.Parent = workspace
	task.delay(self.PrayCooldown,self.NewDust.Destroy,self.NewDust)
end

function FX:Animate()
	RunService.Heartbeat:Wait()
	local track = Humanoid.Animator:LoadAnimation(CheckpointAnims.Pray)
	track:Play()
	task.delay(self.PrayCooldown,track.Stop,track)
end

return FX

This happens also happens anytime after I die.

When do you call this function? Has the player fully loaded? Is the player in the workspace?

add a player.CharacterAdded:Wait() at the top so it gives time for the player to load before it tries to load the animation.

Sorry I forgot to mention I already fixed. If you ever find this problem you need to put it into the same function or thread.

This is the video that solved my issue: https://www.youtube.com/watch?v=iW6A1DkRY7w

1 Like

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