Cannot load the AnimationClipProvider Service Error

So I have been working on my game with animations. Everything works fine first time until I reset my character, this error pops out:
изображение

Code:

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAppearanceLoaded:Wait()
local hum = char:WaitForChild("Humanoid")
local animator: Animator = hum:WaitForChild("Animator")

local anims = {
	idle = animator:LoadAnimation(animsFolder.Idle), --Error pops out in this table
	shoot = animator:LoadAnimation(animsFolder.Shoot),
	reload = animator:LoadAnimation(animsFolder.Reload),
}

I have seen a lot of topics about that but none of it helped me. Any help appreciated!

Found a solution. Need to write this to get character:

    local Players = game:GetService("Players")
    local player = Players.LocalPlayer
    local character = player.Character
    if not character or not character.Parent then
        character = player.CharacterAdded:wait()
    end
1 Like

you can just do

local character = player.Character or player.CharacterAdded:Wait()

instead of using 3 extra lines

I tried it. I saw somewhere that character need full appearence to work and replaced it with CharacterAppearenceLoaded but result was same.

oh ok then happy coding :smiley:

1 Like