Tool equip animation has weird glitch at the beginning

I have a simple knife tool, that plays an equip animation as soon as it’s equipped, but the animation gets really choppy/has a strange bounce back at the beginning of the animation, I have no clue what is causing this or how to solve it. I’ve been having this issue for every single tool that I have made equipping animations for, and I don’t understand why this happens or how to fix it, I’m probably just doing something wrong that’s super obvious and I don’t know it,


any help would be appreciated.

local Equip = script.Equip
local Idle = script.Idle
local track
local track2


--EQUIP TOOL ANIMATION

Tool.Equipped:Connect(function()
	local Humanoid = script.Parent.Parent.Humanoid
	track = Humanoid:LoadAnimation(Equip)
	track.Priority = Enum.AnimationPriority.Action
	track:Play()
	track2 = Humanoid:LoadAnimation(Idle)
	track2.Priority = Enum.AnimationPriority.Movement
	track2.Looped = true
	track2:Play()
end)

Tool.Unequipped:Connect(function()
	if track then
		track:Stop()
	end
	
	if track2 then
		track2:Stop()
	end
end)

That glitch might happened because there is no wait between the 2 tracks.

local Equip = script.Equip
local Idle = script.Idle
local Humanoid = script.Parent.Parent.Humanoid
local track = Humanoid:LoadAnimation(Equip)
track.Priority = Enum.AnimationPriority.Action
local track2 = Humanoid:LoadAnimation(Idle)
track2.Priority = Enum.AnimationPriority.Movement
track2.Looped = true


--EQUIP TOOL ANIMATION

Tool.Equipped:Connect(function()
	track:Play()
    track.Stopped:Wait() -- needed change
	track2:Play()
end)
2 Likes

Oh wow, the solution literally really was that simple, I am simply stupid.

I am glad, I helped! It’s ok it does happen to beginners.

1 Like

your animations might need adjusting

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.