EDIT: I found out that the ClickDetector doesn't work
So I was scripting for someone, it went fine. But then I had to make this script, I see no error, there is not an error in the output either, I've rewritten the script several times, but it doesn't seem to work
Script:
local debounce = false for _, model in pairs(script.Parent:GetChildren()) do if model:IsA("Model") then for _, part in pairs(model:GetChildren()) do if part:FindFirstChild("ClickDetector") then local storage = game:GetService("ServerStorage") part.ClickDetector.MouseClick:connect(function(player) if debounce == false and storage:FindFirstChild(part.Name) then debounce = true local clone = storage:FindFirstChild(part.Name):Clone() clone.Parent = player.Backpack wait() debounce = false end end) end end end end
Layouts:
Note: not all items are shown in the item layout
You named the Button where you get the Item from, as Part and Part is not in your menu :P So try to rename the Part where the ClickDetector is in to one of the Items and it should work