Cannot load animationclipprovider service

local Player = game.Players.LocalPlayer
local char = Player.Character or Player.CharacterAdded:Wait()
local wavebutton = script.Parent.Parent.Play
local stop = script.Parent.Parent.Parent.Parent.Stop
local anim = game.ReplicatedStorage.Animations.Celebrations.Animation

wavebutton.MouseButton1Click:Connect(function()
	local humanoid = char:WaitForChild("Humanoid")
	local animator = humanoid:FindFirstChildOfClass("Animator")
	local track = animator:LoadAnimation(anim)
	track.Looped = false
	track:Play()
	stop.MouseButton1Click:Connect(function()
		track.Looped = false
		track:Stop()
	end)
end)

Starts on line ten when you load the animation.
It plays the animation but if you reset it gives the error

1 Like

Try loading the animation outside of the event.

1 Like

I don’t really understand… so basically put track outside of the connect or…?

1 Like

Yes. Play it inside the connect, but load it outside.

1 Like

This time it just doesn’t show any error.

I fixed this by instead of using

local Player = game.Players.LocalPlayer

i did:

local Player = script.Parent.Parent.Parent

dunno why it worked, but it did.
(assuming the script is parented to the tool)

  1. Its a gui not a tool
  2. Its probably because you defined player till the parent is the player name

whoopsies. guess that was an oversight.

but because player gui is a descendant of the player, it would work if you just did screengui.Parent.Parent


Still didnt solve my issue.
Screenshot 2023-08-03 035936

Can I see your script?
‎ ‎ ‎ ‎ ‎

local Player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent
local char = Player.Character or Player.CharacterAdded:Wait()

local wavebutton = script.Parent.Parent.Play
local stop = script.Parent.Parent.Parent.Parent.Stop

local anim = game.ReplicatedStorage.Animations.Celebrations.Animation

local humanoid = char:WaitForChild("Humanoid")
local animator = humanoid:FindFirstChildOfClass("Animator")

local track = animator:LoadAnimation(anim)

wavebutton.MouseButton1Click:Connect(function()
	track.Looped = false
	track:Play()
	stop.MouseButton1Click:Connect(function()
		track.Looped = false
		track:Stop()
	end)
end)

Maybe you can try adding a “wait()” at the start of your code. Is there any errors?

Before then it was

Cannot load animationclipprovider service

After that guy told me to put track out of the connect function it was gone but the animation would’nt work after resetting still.

Is the animations priority set to Action+? If yes, maybe you can try changing the runcontext of the script to “Client”

?? I don’t understand since Im not familiar with animating… Can you walk me through it?

First, go to the top of your roblox tab and click on “Animation Editor”

After that, click on a rig, then clikc on the three dots and go Import > From roblox
Then, find your animation you used.

After importing, click on the three dots again and go down to AnimationPriority.

Set the animation priority to Action+.

Then, overwrite the animation you used using “Publish To Roblox” under the three dots.

I’ve found a relevant topic that can help because I’m also unfamiliar with this issue.

I also found a memory leak in your code. To fix, change Connect to Once.

I had done that already just doesnt work

you mentioned that there is an error when you reset. Can you please provide more information about the error message you’re receiving?

Did you chagne the script RunContext to client?