is there a way to use a loop but only get the FIRST children with a value in it that is false and that has a certain name
Break out of the loop:
for i, v in pairs(table) do
if child.Value == false then break end
end
or
If you want to return the value:
function getFalseValue()
for i, v in pairs(table) do
if child.Value == false then return child.Value end
end
end
Find out more:
https://www.lua.org/pil/4.4.html
1 Like
maybe
for i, v in pairs(smth:getchildren())
if v == false then
return v
end
end
the loop will break once you return something
2 Likes
thank you very much (30 chhhhh)