I’ve been trying to animate my viewModel arms for a while now. I’m using the Humanoid to animate it. If I load the animation it works on the players character, but won’t load on the viewModels arms.
It’s an R6 Animation, priority is action, and it’s looped.
Heres my script, which is in StarterPlayerScripts:
local viewModel = workspace:WaitForChild("ViewModel")
local humanoid = viewModel:WaitForChild("Humanoid")
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://6577635876"
local loadAnimation = humanoid:LoadAnimation(animation)
loadAnimation:Play()
Pretty bad with animations, any help is appreciated.
And the character type is R15, I realised it was the wrong animation so I change the animation to R6 and it wont work for the character anymore and still wont work for the ViewModel.
I’ve changed the layout a bit tho idk if that changes anything.
-- Tool
local tool = script.Parent
local viewModel = tool.ViewModel
local viewModelHum = viewModel:WaitForChild("Humanoid")
local viewModelHumRoot = viewModel:WaitForChild("HumanoidRootPart", 10) or viewModel.PrimaryPart
tool:GetPropertyChangedSignal("Parent"):Connect(function()
if tool.Parent == character then -- equipped
viewModel.Parent = camera
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://6577635876"
local loadAnimation = viewModelHum:LoadAnimation(animation)
loadAnimation:Play()
end
end)