I want to go through a folder full of BoolValues and check if they are all set to true, if so then something will happen, if not then nothing will happen.
The code below checks through the folder, but doesn't do what I need. It just checks them individually and will execute the code even if only one BoolValue is set to true.
I hope this makes sense.
function CheckValues()
for i,v in pairs (ValuesFolder:GetChildren()) do
if v:IsA('BoolValue') and v.Value then
print("All true")
end
end
end

4 comments
U copied my answer.... although this is a simpler solution
I prefer this answer, because in most cases it will be faster than going through every boolvalue every time.
true
:D