Alright, I know exactly how for i, v in pairs work, but, I can't seem to put my finger on how it would change every single part in every single model transparency to 1.
COMMUNITY QUESTION
Change every part's transparency to 1?
1 answer
A for i ,v in pairs goes through the loop for as many items that are in the table, so for each item in the workspace, the for loop will run and set it's Transparency to 1
Alright, it's called Recursion, read more about it here: http://wiki.roblox.com/index.php/Recursion
function Bruh(parent)
for _, child in ipairs(parent:getChildren()) do
if child:IsA("BasePart") then
child.Transparency = 1
elseif child:IsA("Model") then
Bruh(child) -- recursive step
end
end
end
Bruh(workspace)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Sorry, I mean it will check every single model in workspace and change the parts in the model to transparency 1, So every single part in the entire game.
thanks