Cannot load the AnimationClipProvider Service

Hi, so when I die with a tool it just give me the “Cannot load the AnimationClipProvider Service” stare when I respawn

I’ve been trying to fix this error by myself for several hours now and it still does not work, I think I need a hand here…

I DID unset the player when the character died. Here’s the script

local Player = game.Players.LocalPlayer
repeat wait() until Player.Character
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
repeat wait() until Humanoid
local animator = Humanoid:WaitForChild("Animator")
repeat wait() until animator

local idleanim = script.Parent.Animations:WaitForChild("Idle")
local fireanim = script.Parent.Animations:WaitForChild("Fire")
local reloadanim = script.Parent.Animations:WaitForChild("Reload")

local loadidle = animator:LoadAnimation(idleanim) loadidle:Play()  loadidle:Stop()
local loadfire = animator:LoadAnimation(fireanim) loadfire:Play() loadfire:Stop()
local loadreload = animator:LoadAnimation(reloadanim) loadreload:Play() loadreload:Stop()

tool.Equipped:Connect(function()
	local NewGunUI = tool.GunUI:Clone()
	NewGunUI.Parent = Player.PlayerGui
	NewGunUI.GunName.Text = tool.Name
	NewGunUI.Counter.Text = CurrentAmmo.."/"..ReserveAmmo
	GunUI = NewGunUI
	equipped = true
	canfire = true
	reloading = false
	holdingfire = false
	loadidle:Play(0,1,1)
end)

tool.Unequipped:Connect(function()
	if GunUI then
		GunUI:Destroy()
		GunUI = nil
	end
	holdingfire = false
	equipped = false
	reloading = false
	canfire = false
	for _, animation in ipairs(allanimations) do
		animation:Stop()
	end
end)

Humanoid.Died:Connect(function()
	if GunUI then
		GunUI:Destroy()
		GunUI = nil
	end
	holdingfire = false
	equipped = false
	reloading = false
	canfire = false
	for _, animation in ipairs(allanimations) do
		animation:Stop()
	end
end)

The error happens at this line

local loadidle = animator:LoadAnimation(idleanim) loadidle:Play()  loadidle:Stop()

Any help would be great, thanks!