When you equip the tool it's in your Backpack, (game.Players.xxXDuckzzzXcxcxcx.Backpack), if you look at it in explorer while the game is running, you will see that there is no Humanoid in Backpack, meaning Tool.Parent:FindFirstChild("Humanoid") would be nil, that's why there's error saying that you are trying to use :LoadAnimation function of non-existent instance.
When the tool is laying on the ground and you pick it up, it automatically goes to your character, so the humanoid would be Tool.Parent.Humanoid, but if the tool is in StarterPack then it's in your Backpack by default, that means we need to get the character and then the humanoid like Tool.Parent.Parent.Character.Humanoid.
local Tool = script.Parent
local AnimFolder = script.Parent.AnimFolder
local Weilder = if Tool.Parent:IsA("Backpack")
then Tool.Parent.Parent.Character:WaitForChild("Humanoid")
else Tool.Parent:WaitForChild("Humanoid")
local IdleAnimation = Weilder:LoadAnimation(AnimFolder:WaitForChild("Idle"))
Tool.Equipped:Connect(function()
IdleAnimation:Play()
end)
Tool.Unequipped:Connect(function()
IdleAnimation:Stop()
end)
Tool.Parent is Backpack.
Backpack.Parent is Player (zxzxDuskxzxzx).
Player.Character is the character.
That's why Tool.Parent.Parent.Character.