AnimationClipProvider Service Issue

Hello Everyone, I was making a Viewmodel for my game, and I wanted to add an Animation when player is clicking or interacting with something. And I tried to load animation from Humanoid, but it’s now deprecated, so I tried loading animation from Animator in Humanoid.

But it’s started giving me an error: Cannot load the AnimationClipProvider Service.
I tried already everything, but no changes. Still the same error.

Here is the script (not full):

function Framework:CreateModel()
	local viewmodel = Assets:WaitForChild("Viewmodel")
	local viewmodelClone: Model = viewmodel:Clone()
 
    local hum: Humanoid = viewmodelClone:WaitForChild("Humanoid")
    local animator: Animator = hum:WaitForChild("Animator")

    if hum and animator then
        local animations = self.Animations
        local interactAnimation: Animation = Instance.new("Animation")
        interactAnimation.AnimationId = "rbxassetid://"..self.InteractId
        interactAnimation.Name = "Interact"
        interactAnimation.Parent = viewmodelClone
        animations.Interact = animator:LoadAnimation(interactAnimation)
    end
	local primaryPart: BasePart? = viewmodelClone.PrimaryPart
	primaryPart.Anchored = true
	primaryPart.CanCollide = false
	
	viewmodelClone.Parent = self.Camera
	self.HandModel = viewmodelClone
end

And here is how the Viewmodel is looking in Explorer:
image

If someone can help, that would be really appreciated
Thanks.

1 Like