Custom Weapon Walking Animation

To keep the situation brief, I have custom animations and I can’t seem to figure out how to make the idle animation stop such that the walking animation can play. For context the Handler that handles this will be inside of the tool in the starterpack. Here is the code I have

-- Services
local Players = game:GetService('Players')
local serverStorage = game:GetService('ServerStorage')
local replicated = game:GetService('ReplicatedStorage')
local swordSmith = require(serverStorage:WaitForChild('SwordSmith'))
local swordSettings = require(script.Parent.Handler.SwordSettings)
local audioFolder = replicated:WaitForChild('Audios')

-- Variables
local animFolder = script.Parent:WaitForChild('Handle').Animations
local idleAnim
local walkAnim
local idle = animFolder.Idle
local walk = animFolder.Walk
local swingAnim1 = animFolder.SwingAnim1


local woosh = audioFolder.woosh
local tool = script.Parent
local debounce = false
local data = {
	swingAnims = {}, -- First swing / More coming in future
}
local damage = swordSettings.Damage
local sword = swordSmith.new(tool, data)

tool.Equipped:Connect(function()
	idleAnim = script.Parent.Parent.Humanoid:LoadAnimation(idle)
	idleAnim:Play()
end)

-- Activating the tool
tool.Activated:Connect(function()
	if debounce then
		return
	end
	
	local Players = game:GetService("Players")
	
	debounce = true
	
	woosh:Play()
	sword:Swing(damage)
	
end)

I’m not sure if I can call for the humanoid’s magnitude with it being in a tool. So any advice would be awesome!

Forgive me if I’m mistaken, but I don’t think you are actually calling the swing animation in the first place. When you equip the sword, you play the idle animation, but underneath the tool.Activated function I dont see you call the swing animation.

You can change all of a player’s animations, you don’t need to do this.
Scripting Avatar Animations | Documentation - Roblox Creator Hub

You’re good, but I am calling the swing animation because the animation is sent to a different script for the execution. I have the animation sent as data to a server script that handles the time, damage and animations on activation.