Animations dont start imediately

i am trying to make a small little fps controller thing
everything is going great but i found a relatively large problem when trying to animate the viewmodel:


as you can see, the animation starts maybe a frame or a couple of frames after “equipping” the viewmodel. (I am preloading all animations, so the problem isnt that)
i have found a workaround which is putting a task.wait() right after the animation and after that starting to move the viewmodel towards the camera.
i would rather not use this since it might mess up the animation timing slightly

Are you using animator:LoadAnimation(animInstance)? Also, are you making the viewmodel visible before playing the animation?

If you copy/paste the script here we may be able to see something that you’ve missed.

i am loading like that yes (and preloading the animations at the start of the game) but i tried both making the viewmodel visible before and after playing the animation but it gives the same result, for 1 singular frame it shows up before playing the animation

After that, how are you keeping the hand in position? Are you using an animation, or is it like that by default?

loadedAnimations["Idle"]:Play()
loadedAnimations["Equip"]:Play(0)

this is how i play the animations
the first one is looped

I think this may be your issue. You should instead try to play the Idle animation after the Equip animation ends.

loadedAnimations["Equip"]:Play()
loadedAnimations["Equip"].Ended:Connect(function()
	loadedAnimations["Idle"]:Play()
end

that’s not the solution, im just going to do this: (inside the update function)

if currentViewmodel.Parent ~= workspace then
		currentViewmodel.Parent = workspace
		return --  This is done so that the animation has 1 frame before actually starting
	end

to skip for 1 frame. this is the best solution i could come up with

there was another way i did which is just the non animated viewmodel just stays below the visible camera