wait(2) local children = script.Parent:GetChildren() for i = 1, #children do allstuff1 = children[i] allstuff1.Transparency = 0.7 end wait(0.1) for i = 1, #children do allstuff1 = children[i] allstuff1.Transparency = 0.6 end wait(0.1) for i = 1, #children do allstuff1 = children[i] allstuff1.Transparency = 0.4 end wait(0.1) for i = 1, #children do allstuff1 = children[i] allstuff1.Transparency = 0.1 end
im trying to change a group of parts transparency in stages, Im getting an error at line 7 saying: (transparency is not a valid member of script)
You need to add a check.
for i = 1, #children do if not i:IsA("Part") then return end--It checks if the object is a part and if not then it stops the current loop allstuff1 = children[i] allstuff1.Transparency = 0.7 end