when this script runs to drog an item it creates lag, the first time not so much but reapeating it makes it lag alot and ends up crashing. anyone know why?
local drop = script.Parent drop.MouseButton1Click:connect(function() local item = _G. globalslot local itemobj = item.SlotImage.ItemName.Value local clone = game.ReplicatedStorage.WorldItemDrops:FindFirstChild(itemobj):Clone() clone.Parent = game.Workspace item.SlotImage.Image = "" item.SlotImage.SlotAmount.Text ="" item.SlotImage.ItemName.Value = "" drop.Parent.Visible = false end)
I see no wait()
or a debounce
.