Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to change every of a Part's children's properties?

Asked by 6 years ago
Edited 6 years ago

I want to know if there is a more efficient way of changing the properties of a Part's children like changing every child's transparency all at once.

1 answer

Log in to vote
0
Answered by 6 years ago

You can use ipairs. Example:

for i,v in pairs (game.Workspace.Model:GetChildren()) do --gets the children in game.Workspace.Model
v.Name = "bob" --Changes the Childrens Name to bob
end

i hope it helped

basically i is index and v is variable it doesnt have to be i,v

accept answer to show this question was answered and i dont like leeches

Ad

Answer this question