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