Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to equip a tool that does not lie in the player backpack folder?

Asked by
vovik 9
5 years ago
Edited 5 years ago

Hi!

I have a separate folder for each type of tools in which they are stored. When I equip a tool through a script, it cannot take it normally - the hand is raised and there is no tool, it does not work.

Is there a way to equip tool so that it does not lie in a backpack but in a different folder?

P.S I know about :EquipTool but if the item is not inside player backpack folder its not working.

Thanks)

0
Your issue isnt the backpack, its the tool itself. You need to get a weld script. mc3334 649 — 5y
0
Is it? If I equip it in the usual way everything is fine vovik 9 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

After testing, I found that :EquipTool() will work if you parent it to the Player's Backpack then run :EquipTool().

local Tool = Tool
Tool.Parent = Player.Backpack
Humanoid:EquipTool(Tool)

This also applies to parenting it to the Character:

local Tool = Tool
Tool.Parent = Player.Backpack
Tool.Parent = Player.Character

Don't know why that is the case, but it is.

Ad
Log in to vote
0
Answered by
NSMascot 113
5 years ago

in lighting, put the tools in a folder called "Tools", lets say you have a tool called weapon1, this is the script

local script

-- This clones the weapon from "Lighting" to the players backpack
game.Lighting.Tools.weapon1:Clone().Parent = game.Players.LocalPlayer.Backpack
0
please don't downvote, NSMascot 113 — 5y

Answer this question