So I made 2 scripts, and I keep getting the error "Humanoid is not a valid member of backpack." PipePullOut is an animation, and the pull out and attack animations work just fine, but the line that makes them stop has an error. I dont know what I did wrong. I am a beginner to scripting, so Im pretty clueless.!yeet
You have to use unequip in the same piece of code as the equip for it too work.
I had this exact same issue a while back!
Hope it helps.
local CanAttack = true script.Parent.Equipped:Connect(function() local PipePullOut = script.Parent.Parent.Humanoid:LoadAnimation(script.PipePullOut) local PipeAttack = script.Parent.Parent.Humanoid:LoadAnimation(script.PipeAttack) PipePullOut:Play() script.Parent.Unequipped:connect(function(mouse) PipePullOut:Stop() end) end)
If you need further help on this matter just ask.