Viewmodel Animations - Difficulties pre-running/equipping an animation

I have a first-person weapon viewmodel and I also have an equip animation. Everything technically works fine, but there’s an annoying thing. My viewmodel always starts at its default position, and it tweens itself to the animation’s starting position, instead of being at the animation’s starting position in the first place.

My animation looks like this:

In-game, it looks like this (note the beginning, where you can see the gun before the animation):

I’ve also tried pre-running the animation. I loaded the animations into the animator, and placed the viewmodel inside a folder inside the player (Players.LocalPlayer.PreloadedViewmodels.<Viewmodel>), then playing the equip animation, pausing, and setting its TimePosition to 0. That didn’t work.

My code is rather complex, but here’s the equip portion:

		self.animation_table.equip = animator:LoadAnimation(anim_equip)
		self.animation_table.equip.Priority = Enum.AnimationPriority.Action

...

	tool.Equipped:Connect(function()
		equipped = true
		game.ReplicatedStorage.Viewmodels[data.metadata.identifier]:Clone().Parent = camera
		load_animations()

		self.animation_table.equip:Play()
	end)

self.animation_table.equip:Play(0.0000001) and it should work cause roblox tweens anims when you play them and the first argument of play is the time it takes to do it (i dunno if 0 works but try it too)

That’s a very good solution! It works. However the problem still kind of persists for the initial equipping sequence:


Is this a loading issue (unfixable), or is the viewmodel unable to play it somehow?

	tool.Equipped:Connect(function()
		equipped = true
		self.viewmodel.Parent = camera
		self.animation_table.equip:Play(0.000000001)
	end)

i honestly cant see it in this vid you sent but if it is a loading issue just preload it (or are you talking about the slight stutter that happens every time you equip?)

Yep - the slight stutter - the first equipping sequence always has the stutter, but subsequent equipping sequences don’t have the stutter (in game, but it still persists in the recording for some reason).

oh then its definitely just a loading issue just use preloadasync of contentprovider

Increasing the starting position seems to have solved the subsequent stutters, and this suggestion will probably solve the first stutter as well. I increased the starting position to 0.01 and there seems to be no stutter even in recordings.

Thanks for your help!