"Cannot load the AnimationClipProvider Service."

I’m trying to play an animation when you click a button but it gives me the error " Cannot load the AnimationClipProvider Service." (Line 7) after I reset or my character dies. This is on a local script And I can’t find a good solution. Any help is appreciated.

Dummy = game.Players.LocalPlayer.Character
local Emotes = game.Workspace.GlobalVariables.Emotes
game.ReplicatedStorage.PlayEmote.OnClientEvent:Connect(function()
	if game.Workspace.GlobalVariables.Emotes.a6.Enabled == true then
	local animation = Dummy.Script:WaitForChild('Animation6')
	local humanoid = Dummy:WaitForChild('Humanoid')
	local animation = humanoid:LoadAnimation(animation)

	local animation2 = Dummy:WaitForChild("Animate").idle.Animation1
	local humanoid2 = Dummy:WaitForChild('Humanoid')
	local animation2 = humanoid:LoadAnimation(animation2)
	animation.Looped = false
	for i,v in pairs(Dummy:WaitForChild("Humanoid"):GetPlayingAnimationTracks()) do
		v:Stop()
		animation:play()
		wait(0.2)
		Dummy.slam:play()
		animation.Stopped:wait()
		animation2:play()
		animation.Looped = false
		end
	end
end)

script.Parent.MouseButton1Click:Connect(function()
	Emotes:FindFirstChild("a6").Enabled = true 
	for i, EmoteObj in pairs(Emotes:GetChildren()) do
		if EmoteObj.Name ~= "a6" then
			EmoteObj.Enabled = false
		end
	end
end)
1 Like

Is this script under StarterPlayerScripts?
Anyways, you should update your character or Dummy variable whenever the player character changes (respawn) Or put the script inside the StarterCharacterScripts and the script will be replaced automatically upon reset.
This error probably because the PlayEmote event fires while the character’s parent is nil.

Yeah, this has been a weird error lately. I’ve never had this error show up before, and now it does occasionally.

You will find a solution in this post:

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