ViewModel Arms not Animating

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.

This is what it looks like:

image

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.

1 Like

sorry to bump this but still been tryin

Does your character have a torso?

The viewmodel?

This is what the viewmodel looks like:

image

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.

Are those welds? Sorry I’m a little blind. If they are switch them to joints. If they aren’t I’ll look at it and see if I can find the problem.

They are joints not welds.

image

Try setting the animation priority to movement.

1 Like

Yeah. You need to change the animation priority accordingly or problems may occur.

2 Likes

Still the same, arms arent animating.

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)

image

When is the animation supposed to play? And why?

There’s the problem. Viewmodel is in the tool! (I think that causes issues)

It plays when the tool is equipped, to move the arms into this position

image

I parented the viewmodel to the camera?

Then set the priority to action. That may help.

1 Like

Still might cause problems. Try putting it somewhere else, such as ReplicatedStorage?

1 Like

If you’re planning on using a equip animation, use movement for the idle instead. Make sure it’s looped too.

Doesnt change anything at all, it doesnt matter where it is cause it gets reparented anyways

Uploading: image.png…

1 Like

Yes, the animation is looped already. It works on the players character (when it was R15) so it cant be the animation.

Did you animate it in an r15 character?

Is the rig not anchored and collide? If it isn’t, then there might be a problem with welding or something else.

1 Like