e = game.Workspace.Exterior:GetChildren()
for i, v in pairs (e) do if v.ClassName == "Part" and v.ClassName == "WedgePart" then for i = 0, 1, 0.1 do v.Transparency = i wait(0.1) end end end
first, I would set up a function to get all the objects in a table.
local stuff = {} -- empty table function get(model) -- function for i,v in pairs(model:GetChildren()) do -- loop through all objects if pcall(function() v.Transparency = 0 end) then table.insert(stuff,v) end -- if "Transparency" is a property get(v) -- repeat loop on the object (for models within models and decals also) end end get(workspace.Exterior) -- get all the Transparency items within "Exterior" for i = 0,1,.1 do -- loop from 0 to 1 (from visible to invisible) wait(.1) for t,k in pairs(stuff) do -- loop through all your parts k.Transparency = i -- set each part (or decal) to its transparency end end
I hope this makes sense. The
pcall(function() v.Transparency = 0 end) then end
basically determines if v, an object or decal or whatever, if it has "Transparency" as a property. if it does have the property, it returns true and does "table.insert(stuff,v)". then it loops upon itself until all objects are inside the table.
Locked by adark, Spongocardo, and BlueTaslem
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?