suppose to display 3 buttons: "1", "2","3" but only show "3","3","1" cant figure out why
local gui = script.Parent
local guii = gui.Frame
local frame2 = gui.Frame1
local button1 = gui.button
local Button = script.Parent.Configuration.a1
local slots = gui.Frame.ScrollingFrame.FrameH
local pack
local ply = gui.Parent.Parent
local list1 = {
"1", "2", "3"
}
local list2 = {
"1", "2", "3"
}
--[[button1.MouseButton1Up:connect (function()
a = Instance.new("TextLabel")
a.Parent = game.Lighting:findFirstChild(ply.Name.."sPack")
end)]]
y = 0.3
x = 0.3
maxX = 0.9
maxY = 0.9
-- Y + 60
-- X + 40
function getMyPack()
pack = game.Lighting:findFirstChild(ply.Name.."sPack")
end
function removeOldOutOfTheWay(location)
for index, child in pairs(location) do
if child.Name == "a1" then
child:Remove()
y = 0.3
x = 0.3
end
end
end
function New()
removeOldOutOfTheWay(slots:getChildren())
local lo = pack:getChildren()
for index, child in pairs(lo) do
neww = Button:Clone()
neww.Position = UDim2.new(x, 0, y, 0)
neww.TextLabel.Text = child.Name
neww.Parent = slots
x = x + 0.15
if x > 0.7 then
y = y +0.015
x = 0.3
end
end
end
getMyPack()
New()
pack.ChildAdded:connect(function()
New()
end)
pack.ChildRemoved:connect(function()
New()
end)
for i, v in pairs(list2) do
n = gui.Configuration.Value:Clone()
for g = 1,#list1 do
for g = 1,#list2 do
n.Name = list1[g]
n.Value = list2[g]
n.Parent = game.Lighting:findFirstChild(ply.Name.."sPack")
end
end
end

2 comments
Don't just say "Thanks." There's a way to accept answers -- it helps everyone keep track of the status of questions and gives a point spending time to answer your questions -- that goes for ALL of your posts; it appears you have never used it...
wont let me i tried tho