TOOL.Unequipped:Connect(function()
for i, idle in pairs(IDLEANIM) do
local HUM = TOOL.Parent:FindFirstChildOfClass("Humanoid")
local IDLEANIMS = HUM:LoadAnimation(idle)
IDLEANIMS:Stop()
end
end)
At line 4, it prints as an error, saying "attempt to index nil with 'character'", and doesn't stop the animation. All variables are earlier on in the script, so its not those. I'm pretty sure it has something to do with the fact that when the tool is unequipped, it can't find the humanoid through script.Parent, but I still don't know how I'd fix it. If you know how, please tell me. Thanks.
