So i've been stuck on this for a while, whenever i have tried to trigger the animation when activating the prox prompt it always says "Cannot load the AnimationClipProvider Service."
I have put my viewmodel into the workspace instead of Rep Storage, didnt work, tried game:GetService('RunService').Stepped:Wait() and task.wait(), also didnt work, i need some help figuring this out lol
below are my scripts for my viewmodel and the Prox Prompt script
Local - ViewModel
local Viewmodel = game.Workspace:WaitForChild("Viewmodel")
local viewModelInstance = Viewmodel:Clone()
local Anim = game.ReplicatedStorage:WaitForChild("Anims")
local MainModule = require(game.ReplicatedStorage.ModuleScript)
-- Parts must be anchored in the workspace so this is my fix, does not affect anything else
viewModelInstance.Parent = game.Workspace
viewModelInstance["Left Arm"].Anchored = false
viewModelInstance["Right Arm"].Anchored = false
viewModelInstance["HumanoidRootPart"].Anchored = false
-- idle animation for my viewmodel, took out the animation temporarily when i was messing with locomotion
local Animation = Anim.Idle
Animation.AnimationId = "rbxassetid://"
-- gets the module script
game:GetService("RunService").RenderStepped:Connect(function(Dt)
MainModule.update(viewModelInstance, Dt)
end)
-- to trigger the the idle anim
game:GetService("UserInputService").InputBegan:Connect(function(input)
local Humanoid = viewModelInstance:FindFirstChildOfClass("Humanoid") or viewModelInstance:FindFirstChildOfClass("AnimationController")
if not Humanoid then
Humanoid = Instance.new("AnimationController")
Humanoid.Parent = viewModelInstance
end
local Animator = Humanoid:FindFirstChildOfClass("Animator")
if not Animator then
Animator = Instance.new("Animator")
Animator.Parent = Humanoid
end
local AnimationTrack = Animator:LoadAnimation(Animation)
AnimationTrack:Play()
end)
** You are now Level 8! **