"Cannot load the AnimationClipProvider Service." error

Hi! I was scripting a weapon in Roblox and I am having an issue that I’ve never encountered before. Could anyone help me with this? The error is: Cannot load the AnimationClipProvider Service.

btw this is a script (can’t use local scripts because it makes the tool disappear for some reason after some time) inside of a tool.

local plrname=tostring(script.Parent.Parent.Parent)
local plr=game.Players:FindFirstChild(plrname)
local char=plr.Character or plr.CharacterAdded:Wait()
local Hum=char:WaitForChild("Humanoid")
local Animator=Hum:WaitForChild("Animator")
local tool=script.Parent
local animSWING=Animator:LoadAnimation(tool.Swing)
local animIDLE=Animator:LoadAnimation(tool.Idle)
local m6d

local function equiptool()
	m6d=script.Parent.BodyAttach.Motor6D
	m6d.Part0=char:FindFirstChild("Right Arm")
	m6d.Part1=script.Parent.BodyAttach
	animIDLE:Play()
end

animSWING.Ended:Connect(function()
	--animIDLE:Play()
	print("hii")
end)

local function Swing()
	animSWING:Play()
	animIDLE:Stop()
end

script.Parent.Activated:Connect(Swing)
script.Parent.Equipped:Connect(equiptool)

You should use local.

Also, why is your tool grip a Motor6D? And why is the grip not being created on the server?

1 Like

I suggest adding a small wait at the very top of your script, that’s what fixed the problem for me :slightly_smiling_face:

1 Like

Agreed, I tried your solution and it works fine.

1 Like

This may happen because you get the character just a bit before it reaches the workspace.

You could use a wait like others above me said.

You can alternatively use .CharacterAppearanceLoaded instead of CharacterAdded, that way you know for sure it has reached the workspace.

Despite those two solutions, I still recommend you to move the animations to the client, and to keep the grip part in the server.

The grip is being created on the server and the reason I’m not using local script (as stated above) is because it instantly destroys the tool upon equipping it with the local script.

This actually did work but I can’t deny that this is such a dumb reason for a fix. Why does this even happen in the first place? This is stupid. But thanks for the help anyways!

1 Like

The method above did work but the .CharacterAppearenceLoaded solution did not. Also this is meant to be a multiplayer fighting game so if I were to put the animations on the client then that wouldn’t work either. I’ll just go with the wait method for now. Thank you!

1 Like

I’m not sure, I’m guessing the animations load somehow before the character even loads in? :man_shrugging:

Then why don’t you use Tool.Grip?

Animations replicate.

By this, do you mean to animate everything using Tool.Grip? That sounds both hard to do and very slow and tedious. Please clarify if I’m wrong on this.

You’d just have a fake handle and then connect it to your parts with a motor 6d in the tool itself.

Also I forgot to write this yesterday but I followed a tutorial on the devforum (specifically How to animate Tool Parts (Guns, Knifes etc.)) to make the tool actually be able to be animated and it said to use motor6d for the tool grip

That’s only if you use R6. If you use R15, you animate the RightHand

I do have a fake handle, the hierarchy is:

image

The fake one should be animated and the real one should be invisible and fixed. The invisible real one should be named “Handle” so it automatically adds the grip on the server so you can animate on the client.

That’s still fine, the project is meant to be in R6 exclusively anyways

oooooh I see what you mean, I’ll try it out right now. Thank you for clarifying

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