Cannot Load AnimationClipProvider Error, After Death Bug

So I am making a game that has guns in it and I was doing great until I hit an error that has been reported and posted in other forum Posts, but none of them have a solution.

The Error that is causing this Says

“Cannot Load AnimationClipProvider Service”

and it causes the Animations to not play. Now the Animations work perfectly fine and there’s not bug when you first play, but if you die, then the Error comes, and if you use the gun after the Error Comes, Aka After Death then the Animations for the gun Don’t work.

The Animations That are meant to be playing are the gun animations, Such as: Equipping then Holding it idle and Unequipping it.

Cannot Load AnimationClipProvider Service

I’ve tried seeing if it was the character variable referring to the old character after death, but I don’t think it was that. And I’ve tried a few other things that I can’t remember as of making this.

I’ve also tried looking around other posts on the forum to see if others have this error and there’s a lot but none of them have answer, they either say

“It’s because of team create because others animations”

(Which isn’t the case because I am working Solo on this Project and all the animations belong to me) or they don’t have any answers.

Now this is my first post so I am not too sure if this is the right topic section for this post and I tried to put this Post in the Engine Bug Category but couldn’t find it. So if this is the wrong section please tell me, and I’ll take note!

And yeah I’m pretty sure this is an Engine bug but couldn’t find the Category.

Also, Thank you to any replies And suggestions! :grin:

And Here’s the code in the script, that doesn’t work after death:

local Uis = game:GetService("UserInputService")
local Rs = game:GetService("RunService")
---
local Plr = game.Players.LocalPlayer
local Chr = Plr.Character or Plr.CharacterAdded:Wait()
local Camera = game:GetService("Workspace").CurrentCamera
---
local Gun = script.Parent
local AimEvent = script.Parent.GunHoldAnim:WaitForChild("AimEvent")
local AmmoEvent = script.Parent.Server.AmmoEvent2
local EquipEvent = script.Parent.GunHoldAnim.EquipEvent
local M9AnimEvent = game.ReplicatedStorage.BindableEvents.GunAnimationEvents.M9AnimEvent
---
local AmmoGui = Plr.PlayerGui:WaitForChild("AmmoDisplay").AmmoGuiM9
--


---


Humanoid = Chr:WaitForChild("Humanoid")
local Animator = Humanoid:FindFirstChild("Animator")
local HoldId = script:WaitForChild("Hold")
HoldAnim = Animator:LoadAnimation(HoldId)
local AimId = script:WaitForChild("Aim")
AimAnim = Animator:LoadAnimation(AimId)
local AimReloadId = script:WaitForChild("AimReload")
local AimReloadAnim = Animator:LoadAnimation(AimReloadId)
local UnequipId = script:WaitForChild("Unequip")
UnequipAnim = Animator:LoadAnimation(UnequipId)
local AimingUnequipId = script:WaitForChild("AimingUnequip")
AimingUnequipAnim = Animator:LoadAnimation(AimingUnequipId)
---


EquipEvent.Event:Connect(function(IsAiming)
Gun.Equipped:Connect(function()
		print("Equipped!0")
	if Humanoid then
		AmmoGui.Enabled = true	
		HoldAnim:Play()
		wait(0.5)
		HoldAnim:AdjustSpeed(0)
		AmmoEvent:FireServer(Chr, Humanoid)
	end		
end)
--
Gun.Unequipped:Connect(function()
	AmmoGui.Enabled = false
		if IsAiming.Value == false then
		HoldAnim:AdjustSpeed(1)
		UnequipAnim:Play()	
		end
		if IsAiming.Value == true then
			HoldAnim:AdjustSpeed(1)
			AimAnim:AdjustSpeed(1)
			AimingUnequipAnim:Play()
		end
	end)
end)
2 Likes

There has been several posts about this. My current workaround:
repeat wait(0.1) until Player.Character.Parent == workspace

for i,v in ipairs(game.ReplicatedStorage.Animations:GetChildren()) do 
	if v:IsA("Animation") then 
		Player.Character:WaitForChild("Humanoid"):LoadAnimation(v)
	end
end

This behaviour has been happening ever since the new animation update in announcements (to my knowledge). I’ve yet to have a issue with this current workaround. It seems the root of the error is mainly that it’s trying to load animations before the characters parent is a valid service. (Doing waitforchild without the parent check still causes the issue which is why i applied that repeat loop Also still happens even if you do Player.CharacterAdded:Wait() or Player.CharacterAppearanceLoaded)

6 Likes

Ok, I will try this, but just to let you know, the Animations are parented to the script inside the Tool, so does that mean I’ll have to re-Parent the Animations to Animation inside Replicated Storage? Or Can I just do?

for i, v ipairs(script:GetChildren()) do 
if v:IsA("Animation") then 
		Player.Character:WaitForChild("Humanoid"):LoadAnimation(v)
	end
end

Thanks for the help

Edit: Also Where do I put the Loop in the script

That’s just an example, i load all animations into character the first time they spawn (on client) as if you don’t the tirst animation :Play() will always be delayed or plays at halfway into the animation

Thanks it worked, All I did was used that piece of code, but then did this:

4 Likes

This was really helpful, thank you so much.