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!