Basically, when I click E, the bag goes to invetitory, but its's weird. When I select the First Bag, on explorer, it appears it's name, but when I change to the Second bag on inventitory the Bag (Tool) on explorer replaces the First One.
local bagTool1 = game.ReplicatedStorage.BagWeaponFold.Left.TBackBottomLeft
local bagTool5 = game.ReplicatedStorage.BagWeaponFold.Left.TFrontBottomLeft
local bagTool1Clone = bagTool1:Clone()
local bagTool5 = game.ReplicatedStorage.BagWeaponFold.Left.TFrontBottomLeft
local BackBottomLeft = game.Workspace.Cashes.Left.BackBottomLeft
local FrontBottomLeft = game.Workspace.Cashes.Left.FrontBottomLeft
UIS.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.E then
--LEFT
if (BackBottomLeft.Union.Position - HumanoidRootPart.Position).magnitude < 5 then
bagTool1Clone.Parent = player.Backpack
BackBottomLeft:Destroy()
else
print("You are not close")
end
end --end key
if key.KeyCode == Enum.KeyCode.E then
if (FrontBottomLeft.Union.Position - HumanoidRootPart.Position).magnitude < 5 then
bagTool5Clone.Parent = player.Backpack
FrontBottomLeft:Destroy()
else
print("You are not close")
end
end
end) -- end funct
