Hi, I am creating an inventory system. I have this problem where if the tool in question is taken from the inventory and put in the backpack and then dropped, the tool becomes Child of the Workspace but the tool remains attached to the Character’s hand.
The tool that the script gives you when you click on a slot to get the tool in the backpack, is a clone of a replicated model of the tool stored in ReplicatedStorage.Tools
-- THE FUNCTION FOR WHEN A SLOT IS CLICKED
local function Click(Slot)
print("Click")
local Tool
local ImageID
if Inventory:WaitForChild(Slot):WaitForChild("Occuped").Value == "" then
if char:FindFirstChildOfClass("Tool") and char:FindFirstChildOfClass("Tool"):FindFirstChild("ImageID") then
Tool = char:FindFirstChildOfClass("Tool")
ImageID = Tool:FindFirstChild("ImageID").Value
Inventory:WaitForChild(Slot).Image = ImageID
Inventory:WaitForChild(Slot):WaitForChild("Occuped").Value = Tool.Name
Debris:AddItem(Tool, 0.2)
end
else
if CountEquipped() < MaxEquipped then
Tool = Inventory:WaitForChild(Slot):WaitForChild("Occuped").Value
Inventory:WaitForChild(Slot).Image = ""
Inventory:WaitForChild(Slot):WaitForChild("Occuped").Value = ""
local ToolClone = Tools:WaitForChild(Tool):Clone() -- HERE IT CLONES THE REPLICATED COPY OF THE TOOL THAT IS STORED IN REPLICATED STORAGE
ToolClone.Name = Tool
ToolClone.Parent = backpack
end
end
end
This is the Explorer Setup
Thanks