Here is the structure Model > Brick (x100, I have 100 or so bricks in the model) > Int Value (there is an int value in each brick)
I try something like this,
local blah = game.Workspace.Model:GetChildren() for i, v in pairs(blah) do if v.IntValue.Value == "0" then v.IntValue.Value = 1 v.Name = "Done" end
end
However the int value never gets changed, it seems that the for i, v in pairs only iterates through the bricks and not what is inside of the bricks. Do I need to do another for loop? If so, what would I put inside of pairs( ) ?

1 comment
Your code should be working from what I've seen. Maybe one of the bricks doesn't contain an IntVal, use an 'if' statement to check for the IntVal and see if it works.