What is the problem? I need to get the names of all the ImageButton, but instead I get "nil". Where was I wrong?
script.Parent.MouseButton1Click:connect(function() local logos = script.Parent.Parent:GetChildren() for i,v in pairs(logos) do if v:IsA("ImageButton") then print(logos.Name) end end end)
You're trying to print the name of the table logos
instead of the name of each ImageButton in the table.
Change line 6 from print(logos.Name)
to print(v.Name)
.