Disabling idle and walking animations when equipping a tool and enabling when unequipped

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to disable all animations of walking, idle etc when equipping a tool
  2. What is the issue? Include screenshots / videos if possible!
    There are no issues I just want to know how to do that
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Yes, I tried disabling the animate local script but it didn’t work.

have a function that disables animations and :GetPlayingAnimationTracks() method to get all animation tracks

local function DisableAllAnims()
   local anims = humanoid.Animator:GetPlayingAnimationTracks()
   for i, v in pairs(anims) do
      print(v.Name)
      -- use if statements to disable blacklicsted anims
   end
end

I did that and it didn’t work sadly