Cannot load the AnimationClipProvider service

A tool that I made always errors whenever I die, so if the tool is unequipped it errors cannot load animationclipprovider service, same thing if it’s equipped, why?

Here is a localscript


local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()

local RaycastHitbox = require(game.ReplicatedStorage.RaycastHitboxV4)
local Hitbox = RaycastHitbox.new(script.Parent.Model.Hitbox)
local Params = RaycastParams.new()
Params.FilterDescendantsInstances = {char}
Params.FilterType = Enum.RaycastFilterType.Exclude
Hitbox.RaycastParams = Params

local tool = script.Parent

local slashingsound = script:WaitForChild("SlashingSound")

local slashing = false

local Idle = char:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(script.Idle)
local Slash = char:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(script.Slash)

tool.Equipped:Connect(function()
	game.ReplicatedStorage.RemoteEvent1:FireServer(tool.Model.BodyAttach)
	
	char["Right Arm"].ToolGrip.Part0 = char["Right Arm"]
	char["Right Arm"].ToolGrip.Part1 = tool.Model.BodyAttach
	
	Idle:Play()
end)

tool.Unequipped:Connect(function()
	game.ReplicatedStorage.RemoteEvent2:FireServer()
	
	Idle:Stop()
end)

tool.Activated:Connect(function()
	if slashing then return end
	Slash:Play()
	slashingsound:Play()
	Hitbox:HitStart(0.2)
	Hitbox.OnHit:Connect(function(hit, humanoid)
		print(hit)
		humanoid:TakeDamage(34)
	end)
	slashing = true
	wait(2.3)
	slashing = false
end)
2 Likes

Experiencing this issue as well, might be an engine bug however I found a workaround that works for me:

Workspace:WaitForChild(LocalPlayer.Name)

try putting the animations in workspace.

pretty sure LocalPlayer.CharacterAdded:Wait() works the same

thanks for the new knowledge, i barely know stuff about animation errors.

no sometimes the character added signal fires before the animation clip provider service loads, already tried that before.

Sorry for the late reply, I’ll try this later as i’m busy

Putting the animations in workspace did not work

is this just referencing the local player?

1 Like

The code errors upon animation loading because the character has not been parented to workspace yet, therefore a fix should be:

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
if not char.Parent then
	char.AncestryChanged:Wait()
end

I’ll try this

This text will be blurred

It’s not giving the error anymore however when respawning, equipping the tool just makes it fall to the ground and disappear from the inventory

That means the code never resumes execution… maybe AncestryChanged never fires??

Try this?

if not char.Parent then
	char:GetPropertyChangedSignal("Parent"):Wait()
end

Edit: I just remembered something, it may be getting an old character of yours… I am not too sure about a workaround for this, but I’ve experienced that before. Maybe it’d work if you did something like this:

local char = plr.Character
if not char or not char.Parent then
	char = plr.CharacterAdded:Wait()
end

Once again, not too sure if this is a functional solution but… maybe?

Edit #2: After testing it in studio on my own, I factually confirmed I can reproduce an issue of getting the old character & this fixing it, hopefully it does for you too.

1 Like

Its yielding until the local players character is a descendant of workspace. In my code I put the WaitForChild line directly before I load the animation track on my humanoids animator.

hello, i know im pretty late but i know how to fix this issue! all you have to do is: local char = workspace:WaitForChild(plr.Name) and thats how i fixed it!

this basically does not work, I have tried all of these and I just keep getting the error

Damn, really forgot about this post

:sob:

This text will be blurred