can somebody tell me why my humanoid action event is running outside of my equip event?
local Idle = script:WaitForChild("KatanaIdle")
local other = script:WaitForChild("KatanaOther")
local idleAnim = Humanoid:LoadAnimation(Idle)
local otherAnim = Humanoid:LoadAnimation(other)
tool.Equipped:Connect(function()
Humanoid.Running:Connect(function(speed)
if speed > 0 then
for i, v in pairs(Humanoid:GetPlayingAnimationTracks()) do
if v.Name == "KatanaIdle" then
v:Stop()
end
end
otherAnim:Play()
else
for i, v in pairs(Humanoid:GetPlayingAnimationTracks()) do
if v.Name == "KatanaOther" then
v:Stop()
end
end
idleAnim:Play()
end
end)
end)
tool.Unequipped:Connect(function()
for i, v in pairs(Humanoid:GetPlayingAnimationTracks()) do
if v.Name == "KatanaIdle" or v.Name == "KatanaOther" then
v:Stop()
end
end
end)
