This is a snippet of a script, and it doesn't seem to work. Help!
script.Parent.Children.Transparency = 1
It says that Children isn't defined!
If you wanted all the children of a parent to have a transparency of 1, this is how you would do it:
local Children = script.Parent:GetChildren() --GetChildren() returns a table containing all the children of the parent for _,v in pairs(Children) do --This is a "special" for loop that iterates through every element of a table if v:IsA("BasePart") then --If the child is a part... v.Transparency = 1 end end
Hope this helped!
Note: If you still have trouble with GetChildren(), click here: GetChildren()