(imported from rbx animation, the same ID I’m using in game.)
In-game:
(slowed, and as you can see these parts on the right side of the gun start floating out of nowhere.)
The code that plays it:
local animations = {
viewmodelIdle = viewmodelAnimator:LoadAnimation(animationsFolder.viewmodel.idle),
viewmodelAim = viewmodelAnimator:LoadAnimation(animationsFolder.viewmodel.aim),
viewmodelEquip = viewmodelAnimator:LoadAnimation(animationsFolder.viewmodel.equip),
viewmodelShoot = viewmodelAnimator:LoadAnimation(animationsFolder.viewmodel.shoot),
characterIdle = characterAnimator:LoadAnimation(animationsFolder.character.idle)
}
animations.viewmodelIdle.Priority = Enum.AnimationPriority.Idle
animations.viewmodelAim.Priority = Enum.AnimationPriority.Action
animations.viewmodelEquip.Priority = Enum.AnimationPriority.Action2
animations.viewmodelShoot.Priority = Enum.AnimationPriority.Action4
-- By the way, these priorities have already been set when I was uploading,
-- I just tried changing them by script to make sure this wasn't the
-- problem.
local function shoot()
-- other stuff
animations.viewmodelShoot:Play(0.1, 10, .1) -- I tried to increase the weight and play around with these properties but couldn't get it to work
-- the default :Play() with no arguments also has the same problem.
end
The only animation that is playing together with “shoot” is the idle one, and not only does it have one of the lowest priorities but I also tried stopping it before playing the shoot animation but nothing changed.
Also, I animated this on Blender and exported it with a plugin if that changes anything.
I know there are 100+ topics on this but trust me, I read them all and tried their solutions, but nothing worked.
By the way, I’m using an animation controller (with a animator) on the ViewModel, and I just read this:
could that be my issue? I’ll have to use a humanoid on a ViewModel? I (on viewmodels) don’t need any of the extra features humanoid offers, and people usually recommend animation controllers for viewmodels.
For some reason, the model in the editor looks a bit different from the one in-game, but I might be wrong. Or it is because there is no polygon from the point of view of the in-game cam to that right side part thingy, you should check out the model
The right side part thingy moved weirdly at the end of the animation is probably caused by the end of the reload animation not matching with the idle one
Lol the pistol on the rig I was using to import the animation had different C0s on the motors that connect these metal parts, just changed them and it looks fine:
I’m feeling like the dumbest person of the world right now, I spent like 4+ hours trying to fix this, reading about it everywhere and the solution was right under my nose