I want to animate a viewmodel but the animations will not show up. There are no errors. I have tried deleting the humanoid / using an AnimationController instead and switching the parent of my motor6d’s
local player = game.Players.LocalPlayer
local char = script.Parent
local cam = workspace.Camera
local run = game:GetService("RunService")
local gun = game.ReplicatedStorage.Viewmodel:Clone()
run.RenderStepped:Connect(function()
gun:SetPrimaryPartCFrame(cam.CFrame * CFrame.new(0,0,0.5))
end)
gun.Parent = workspace
local LoadedAnimation = gun.anim:LoadAnimation(gun.idle)
LoadedAnimation:Play()
print ("Loaded")