Help on roblox animations error of AnimationClipProvider Service

I have this module which haves a function that loads animations and return the animation track my issue is that when you reset it errors saying Cannot load the AnimationClipProvider Service. :


Here is a video:

Here is the function that loads the animation

local function LoadAnimation(Animations : {}, AnimName : string, looped : boolean)
	local f = false
	assert(PlayerVars.animator, "Cannot load animations when Animator instance does not exists, did you start before loading animations?")

	for k, v in pairs(Animations) do
		if v["name"] == AnimName then
			f = true
			
			print("Animation: \"".. v.name .. "\" ID = ".. v.data.id .. " PRIORITY =" , v.data.priority)
			
			local i = Instance.new("Animation")
			i.Name = v["name"]
			i.AnimationId = v["data"]["id"]
			
		
			local aTrack = PlayerVars.animator:LoadAnimation(i)
			aTrack.Priority = v["data"]["priority"]
			aTrack.Looped = looped

			return aTrack
		end
	end

	if not f then
		warn("Animation does not exists!")
		return
	end
end

This funcion fires when the player is clicking

Idk how this happens, if someone can help me please answer this post

2 Likes

this might be a roblox bug or you havent defined the service correctly but i think its just a studio bug

i mean thats what i was thinking of but idk if its abt the service, it maybe could be
Btw im running the animation following Roblox Docs so they didnt defined the service there… :confused:

To what I’ve seen, this error usually pops up when trying to load an animation onto a humanoid when the character isn’t in Workspace. Try waiting for them to reach Workspace, and then allow the function to run.

Hi! yeah i figured out a few days ago what was happening!
Thanks for the response tho.

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