Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

ViewModel unable to load animations?

Asked by 1 year ago

Everything was going smoothly until I attempted to load an animation; at this point I get a "Cannot Load AnimationClipProvider Service" error;

local plr = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local RS = game:GetService("RunService")
local rStorage = game:GetService("ReplicatedStorage")
local Anims = rStorage.Animations

local viewModel = rStorage.DefaultView:Clone()
local Animations = {
    ["idle"] = viewModel.AnimationController.Animator:LoadAnimation(Anims.Bare_Idle),
}

viewModel.Parent = camera
    Animations.idle:Play()
RS:BindToRenderStep("ViewModel", 301, function(DT)
    viewModel:PivotTo(camera.CFrame )

    end)
end

I've looked this over and I can't seem to understand whats causing this; I have the animation controller and everything in the right place as well. Any pointers are appreciated

0
I have encountered this problem before. I am still uncertain as to why, but I had to parent the ViewModel to the workspace before loading the animations onto it. xInfinityBear 1777 — 1y
0
Thanks that fixed it! If I had to guess I'd say that the viewmodel doesn't exist "fast enough" when cloned as compared to being in the workspace; I'll just have them stored off the main map somewhere. (I'd upvote if I could but I'm not high enough rep) THESBBINGGOD 5 — 1y
0
In the title of this post edit it and put Solved theking66hayday 841 — 1y

Answer this question