I have no idea wtf is happening, this code outputs an error ( https://gyazo.com/0168b4b486c548001409a959119b0233 ) saying at line 27:
itemgui.Parent = script.Parent
that script.Parent is nil.. I don't know what is means because the script does have a parent: https://gyazo.com/e82f25bb51c3c57f9998a03b86e2036a Full code:
wait(2) local db = false script.Parent.Changed:connect(function(val) if db == false then db = true if val == "Visible" then if script.Parent.Visible == true then local itemstoload = game.ServerStorage.DATA_STORAGE:FindFirstChild(script.Parent.Parent.Parent.Parent.Name):FindFirstChild("Items"):GetChildren() for i,v in pairs (script.Parent:GetChildren()) do if v.Name ~= "Script" and v.Name ~= "EmptyItemGui" and v.Name ~= "UndoButton" then v:Destroy() end end local amountofitems = 0 for i,v in pairs (itemstoload) do local itemgui = game.ServerStorage.EmptyItemGui:Clone() local row = math.floor(i/3) itemgui.Position = UDim2.new(0,((i - (row * 3)) + 10),0,((row * 130) + 10)) itemgui.Text = v.Value itemgui.Script.Disabled = false itemgui.Parent = script.Parent amountofitems = i end script.Parent.CanvasSize = UDim2.new(0, 0, math.floor(amountofitems/6), 0) end end db = false end end)
You destroyed it
You were only supposed to blow the bloody doors off
Over on lines 12/13 you destroyed the Script because it wasn't one of those names. That meant that on line 27, the script had no Parent.