Why Tools Dont Go To My Character Backpack? How Do i Make The Tool Go To The Backpack?

So i have inserted a backpack into the npc character

then i added a tool block which i equipped and then unequipped.
when i unequipped it The Tool Didnt get back to the backpack. it just disappeared…


here is the code:

wait(1)
script.Parent.Rig.Humanoid:EquipTool(workspace.Tool)
wait(3)
script.Parent.Rig.Humanoid:UnequipTools()

The tutorial said that the when a humanoid equips a tool it goes to the backpack

Backpack will only work when parented to a character, which is parented by default. If you want a NPC to store thier tool, you should script that yourself.

I dont understand, I added a Backpack to my npc character, why the tool wont go there when i unequip it?

I don’t think a Backpack is needed in an NPC character. Backpacks are only used for characters (I think), so if you really want the bot to equip and unequip kind of like a character, just do something like this:

wait(1)
workspace.Tool.Parent = script.Parent.Rig -- This is kind of how a equipping a tool would be like for an npc
wait(3)
script.Parent.Rig.Tool.Parent = game.ServerStorage -- This is like a Backpack for the NPC

Yeah, I’m pretty sure putting a backpack in a rig wont work., maybe try just making the tool parented to the rig itself?

Backpack is your inventory where all your items go when unequipped and it should only be located under the Player instance.
image
If you want the player to hold the item, parent the Tool directly into the character.
For NonPlayerCharacters (NPC), you will need to make a separate custom Backpack (preferably a folder) located somewhere outside the character (ReplicatedStorage, ServerStorage, etc.).

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.