Long story short, I'm trying to make a color selector thing and I'm trying to make it without having to put a script in every frame, but what I have bellow wont work because I cant get the GUI from MouseButton1Down. How do you fix?
local kids = script.Parent:GetChildren()
function color(click)
print(click.BackgroundColor3)
end
for i=1,#kids do
if kids[i].ClassName == "Frame" and kids[i]:FindFirstChild("TextButton")~=nil then
local fun = kids[i].TextButton.MouseButton1Click:connect(color)
wait()
end
end

1 comment
However... The way that the iteration was done is -faster-