I have coded a drop function that clones a tool from ReplicatedStorage and parent it to a folder in workspace.
local function DropItem(player, item)
local data = Inventory.Get(player.UserId)
local itemInfo = ItemsInfo[item]
if not data or not itemInfo or not itemInfo.Droppable then return end
if Inventory.RemoveItem(item, player.UserId, 1) then --check if player actually has the item to drop
local itemModel = itemInfo.Model:Clone()
if itemModel then
itemModel.Parent = Interactables
if itemModel:IsA("Tool") then
itemModel = itemModel.Handle
if itemModel:FindFirstChild("TouchInterest") then
itemModel.TouchInterest:Destroy()
end
end
local prox = Instance.new("ProximityPrompt")
prox.HoldDuration = .5
prox.ActionText = "Pickup"
prox.Parent = itemModel
player.Character.Humanoid:UnequipTools()
itemModel.Position = player.Character.HumanoidRootPart.Position + Vector3.new(0, 0, -2)
end
end
end
The problem is that only the
Handle is visible, even though in the explorer, I can see all the parts.I changed the itemModel to another part, and now I can see it but not the Handle and the left part!
All the parts and the tool is Archivable, and Transparency = 0
I need help ASAP, any idea is appreciated.
