Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

For loops and numbered parts?

So lets i have 3 parts, each are called, part1, part2, part3. Now lets say i use a for loop. Is there a way to change the part within the for loop? For example:

for i = 1,3 do
    part[i].Name = 'hello'
 end

Is there anyway to do that?

1 answer

Parts = {
workspace.Part1,
workspace.Part2,
workspace.Part3
}

for _,v in pairs(Parts) do
-- code here eg; v.BrickColor = ()
end

I'm guessing this is what your asking?

If there's any errors just let me know, but I guess this is a decent way to do it? (If this is what your asking)

2 comments

0

yes it is thank you!

0

The explanation?

This discussion is preserved as it was. New answers, comments, and votes are closed.