i'm trying to give tools custom animations when held.
my first issue is that if the player is running (default animation) and then equips the tool, the regular running animation stacks with my custom one making certain parts like the wrist act wonky even though my custom one has a higher priority. how do i shut off the regular animations?
my second issue is that when i switch between a custom running animation and a custom idle anmation, it takes around a second to shift when i run and then stop with noticable lag.
this is my equip script for the tool:
all of the variables are denoted before
print("equip")
humanoid = tool.Parent:FindFirstChild("Humanoid")
idletrack = humanoid.Animator:LoadAnimation(idle)
runtrack = humanoid.Animator:LoadAnimation(run)
animate = tool.Parent.Animate
animate.Enabled = false
for _, track in pairs(humanoid.Animator:GetPlayingAnimationTracks()) do
track:Stop()
end
idletrack:Play()
runfunc = humanoid.Running:Connect((function(speed)
print("running ", speed)
if speed > 0 and not trackstatus then
trackstatus = true
idletrack:Stop()
runtrack:Play()
print("track started")
elseif speed == 0 then
trackstatus = false
runtrack:Stop()
idletrack:Play()
end
end))
end))```