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

i want to refrence all children to set transparency to 1 how?

I have a model it has 1,000 parts that would take to long to reference them all so how would I get all children at once like this!

--somehow gets all children-- .transparency = 1

thanks

2 answers

✓ Accepted answer

If i understand correctly, a for loop should be useful in this scenario

for i,v in pairs(model:GetChildren()) do -- Get All Children
 	if v:IsA("BasePart") then -- If its a part
		v.Transparency = 1 -- Makes its transparency 1
	end
end

1 comment

0

THANK YOU SO MUCH

> for _,v in pairs(putplaceofmodelhere:GetChildren()) do
> 	 v.Transparency = 1
> end

1 comment

0

This would work, but if there is something that isn't a part in the model, it will break

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