I have a scrollingframe set up with multiple imagebuttons and in every imagebutton there is a textlabel called NewSelect. Every NewSelect’s text is 0 expect for one which is 1. How would I find the one where the text is 1 not 0?
Here is my current script:
for i, v in pairs(script.Parent.Parent.Parent.ScrollingFrame:GetDescendants()) do
if v:IsA("NewSelect") then
if v.Text == 1 then
print("working") --just for example
end
end
end
The problem is that it doesn’t print out “working” and doesn’t show any errors.
for i, v in pairs(script.Parent.Parent.Parent.ScrollingFrame:GetDescendants()) do
if v.Name == "NewSelect" then
if v.Text == 1 then
print("working")
end
end
end