Animations not loading on viewmodel

I’m attempting to make an animated viewmodel, but for some reason the animations aren’t loading onto it.

--local plr = game.Players.LocalPlayer
local char = plr.Character
local cam = workspace.CurrentCamera

local viewModel = cam:WaitForChild("LeadPipe")
local humanoid = viewModel:WaitForChild("Humanoid")

local animation = script:WaitForChild("Walk")

local loadAnimation = humanoid:LoadAnimation(animation)
loadAnimation:Play()
print("Load anim")

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Well one that looks awesome
Two. what is the animations priority?

You have commented out the plr variable, so it is only a comment and therefore does not exist. Why is this?

thanks and the animations were all set to action

i just realized that im gonna try fixing it

ok so it turns out that was a mistake here and in game its the same

1 Like

So i decided to use another method of true first person, so im no longer using a viewmodel

1 Like

I understand this reply is super late, but the solution to this post is not very good and this the first post that showed up when searching.

I ended up finding out that the answer is super simple:
Your viewmodel MUST have a part within it named "HumanoidRootPart"