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.
✓ ANSWER ACCEPTED
how to fix this humanoid error? It occurs on line 11-12
1 answer
✓ Accepted answer
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.
2 comments
0
It works! Thank you!
0
I had the same issue a while back. It really sucked. You're welcome.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
My budy boi. We need the script lol.
We can't edit the script with an image.