the blessed almighty lord above all errors, i showcase to you, him himself; the ‘Cannot load the AnimationClipProvider Service’ error
yes, i did search this up before, but the ‘fix’ is outdated and no longer work. I need a new solution to this problem.
it doesn’t make any sense, i’m just doing animator:LoadAnimation(animation) inside of a numeric loop to spawn bunch NPCs at once.
for i = 1, 12 do
local model = npc:Clone()
local humanoid = model:FindFirstChildOfClass('Humanoid')
local animator = humanoid:FindFirstChildOfClass('Animator')
local walk = animator:LoadAnimation(animations.walk) -- error happens right here
local attack = animator:LoadAnimation(animations.attack)
end
for i = 1, 12 do
local model = zombieModel:Clone()
local humanoid = model:FindFirstChildOfClass('Humanoid')
local walk = humanoid:LoadAnimation(zombieAnimations.walk)
local attack = humanoid:LoadAnimation(zombieAnimations.attack)
local struct = {
humanoid = humanoid,
attack = attack,
walk = walk,
}
table.insert(activeZombies, struct)
model:PivotTo(getRandomSpawnPointCFrame())
model.Parent = workspace
end
It happens with LoadAnimation() for both Animator and Humanoid, i don’t want to play the animation yet.
error happens as soon as the first LoadAnimation() is called in the ‘walk’ line
Yeah that is the fix i mentioned in the post, and other video i watched but they no longer work, it’s pretty sad that this happens, i think i’ll just change the structure of the code and maybe it will work, because animations are working fine for my character, it’s just the NPC that problems has
the time between the cloning of the model and calling LoadAnimation() for some reason matters, i moved the LoadAnimation() inside the loop and the animation is finally playing.
This happens when you try to play an animation on a rig that has not yet loaded! If you want to avoid this error you have to make sure to parent the rig first before playing any animations!
so if you’re doing something like
local model = ReplicatedStorage.Model:Clone()
model.Humanoid:LoadAnimation() -- will error
All you have to do is to parent first before playing an animation.
local model = ReplicatedStorage.Model:Clone()
model.Parent = workspace
model.Humanoid:LoadAnimation() -- works fine!