Hello!
So I’m having this issue where my view model animation is not working.
I’m wondering if there’s a solution for this problem. I’ve had this problem multiple times now and it’s quite annoying.
Setting the loaded animation:
self.IDLE_ANIMATION = viewmodel.AnimationController:LoadAnimation(wpc.animations.idle)
self.IDLE_ANIMATION_SERVER = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(wpc.serverAnimations.idle)
self.RELOAD_ANIMATION = viewmodel.AnimationController:LoadAnimation(wpc.animations.reload)
self.RECOIL_ANIMATION = viewmodel.AnimationController:LoadAnimation(wpc.animations.recoil)
Equip code:
function gun:equip(viewmodel)
if self == nil then return end
self.EQUIPPED = true
spawn(function()
EquipRequest:InvokeServer(self.NAME)
end)
local hum = viewmodel:FindFirstChild("Humanoid")
local hrp = viewmodel:WaitForChild("HumanoidRootPart")
hrp.Handle.Part0 = hrp -- Not to get confused 'Handle' is a motor6d
hrp.Handle.Part1 = self.HANDLE
self.GUN.Parent = viewmodel
self.IDLE_ANIMATION_SERVER:Play()
self.IDLE_ANIMATION.Looped = true
self.IDLE_ANIMATION.Priority = Enum.AnimationPriority.Action
self.IDLE_ANIMATION:Play() -- This animation isnt playing
print(self.IDLE_ANIMATION.IsPlaying) -- prints true
self.EQUIPPED = true
end
The animation object:
All the motor 6d’s are in the right place, I tested this by copying ingame view model and loading the animation in moon animator and it loaded how I expected it to load
There’s no error in output
Is there something I’m missing?
Thanks in advance