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

How would I Change 3 Parts at the same time?

How would I create a Change in 3 or more Parts with the same name? Like for example I have 3 Parts named Childof_Workspace And I want them to change Colors at the same time. Would I have to be using the In Pairs?

Please Respect that I am a Beginner in need of knowledge

1 answer

✓ Accepted answer

Yes, you'd have to use pairs(). Here's a little example code:

for i, item in pairs(workspace:GetChildren()) do
if item.Name == "Childof_Workspace" then --there are 3 parts named "Childof_Workspace," so the code below will run 3 times
part.Name = "Childof_YOURMOMLOL"
end
end

2 comments

0

What is the use of line 3?

2

Just replace that with whatever you want to do to the three bricks.

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