Made a simple script, where you get an part from a warehouse/shop where it clones the part and puts it on your hand, but recently I've had an issue where the click detector function, to drop the item from the players hand, doesn't work when an item has been cloned.
After it has been cloned, the click detector function just doesn't work any longer. I've tried ways to combat the script just not working, by having it disabled until the part is actually out as it has worked in past similar projects, but this seems to be different.
Here is the clone script
itemlog= game.ReplicatedStorage.warehousestuff.itemswarehouse
player = game.Players.LocalPlayer = script.Parent.Parent.Name
script.Parent.MouseButton1Click:Connect(function()
local item = script.Parent.Parent
local clone = game.Lighting.stuff:FindFirstChild(name)
local cloned = clone.drop:Clone()
cloned.Parent = workspace.ItemHolderFolder:FindFirstChild(player.UserId)
cloned.Weld.Part1 = player.Character.LeftHand
cloned.Script.Disabled = false
local Anim = player.Character.Humanoid:LoadAnimation(cloned.Script.Anim)
Anim:Play()
item:Destroy()
end)
Here is the drop script:
weld = script.Parent.Weld
item = game.Lighting.stuff.wood
script.Parent.ClickDetector.MouseClick:connect(function(player)
if script.Parent.name.Value == "N/A" then
script.Parent.name.Value = player.Name
Anim = player.Character.Humanoid:LoadAnimation(script.Anim)
Anim:Play()
weld.Part1 = player.Character.LeftHand
drop = script.Parent
drop.Parent = workspace.ItemHolderFolder:FindFirstChild(player.UserId)
elseif script.Parent.name.Value == player.Name then
script.Parent.name.Value = "N/A"
Anim:Stop()
weld.Part1 = nil
drop.Parent = workspace
end
end)
I have a similar issue with my horse script, where you mount it by spawning it from a tool, where it teleport to the player and you have to click on it to mount the horse. Any help? :)

2 comments
I really compressed the script by removing a few space lines, oops! Sorry if its ugly
is the clone script in the normal script or local?