I'm not 100% sure what I've done wrong here, but I can tell from the output what I've somewhat done. (in the title)
The error is on line 11.
local count = 1
local modes = {"REDACTED", "REDACTED"}
script.Parent.MouseButton1Click:connect(function()
for i,v in pairs(modes) do
local buttonCoords = script.Parent.Position
local a = script.Parent:Clone()
a.Parent = script.Parent.Parent
a.Text = v
a.MouseButton1Click:connect(function()
script.Parent.Text = v
end)
a.Position = UDim2.new(buttonCoords.X, 0, buttonCoords.Y + count * 155, 0)
count = count + 1
end
end)
It's supposed to me some sort of drop-down menu. Can someone please help me? Thanks.

And keep in mind that the 1st and 3rd components are the scale and the 2nd and 4th are offset.
1 comment
welp no actually its from line 12