So I thought ths 2 lines (not buttons[v]) and buttons[v] = v will stop v from getting inserted to buttons twice, but no it still does.
local buttons = { }
local num = 0
for _, v in pairs (script.Parent:GetDescendants())do
if v:IsA("TextButton") and (not buttons[v])and v.Name == "l" or v.Name == "o" thn
v.MouseButton1Click:Connect(function()
buttons[v] = v
print(buttons[v])
v.TextColor3 = Color3.fromRGB(0,255,0)
num = num + 1
print(num)
if num == 8 then
print("bloxycola")
end
end)
end
end
How to prevent this from happening?

1 comment
Hay, thank you! gonna check if it works