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

how do i make :GetChildren() function grab only parts with 1 name?

Asked by
Mokiros 135
9 years ago

I want to change the part childrens "SurfaceLight", but i have tons of childrens in a part, and simple :GetChildren() doesn't work, and i get errors like that: "Color is not a valid member of SurfaceGui". What should i write in script to get only SurfaceLight? Script looks something like that:

for index, child in pairs(script.Parent:GetChildren()) do
child.Color = Color3.new(255,0,0)
end

Answer this question