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

Possible to change the size of all PART's under workspace Child Folder at once??

Hello and I apologize in advance if this doesn't make sense.

Basically what I am trying to do is change the size of all parts at once under a certain parent folder within workspace.

Workspace.QuestDestinations is the parent, and I want to resize all of the children to a fixed size/number. All children are named 'Part'

All the part's name's are just 'part' so this should theoretically be an easy task. Is this possible?

Thank's a ton for any help.

1 answer

✓ Accepted answer

you can simple use :GetChildren() with for loop and check if is a part and change the size.

Here is a example:

for i,v in pairs(game.Workspace:GetChildren()) do -- Get all children in workspace, with for loop
	if v:IsA("BasePart") then -- Check if children is a BasePart (BasePart literally picks up all kinds of parts. for all i know)
		v.Size = Vector3.new(10,10,10) -- Change all parts size
	end
end

Wiki pages:

For

GetChildren

IsA

Hope it helped :)

Solved your problems? Put in the title [SOLVED] or accept a answer.

1 comment

0

Works like a charm! Thanks a ton

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