This is what I've tried.
local model = script.Parent
local baseParts = {}
local findAllBasePartsDescendants = function(parent)
for k, v in pairs(parent:GetChildren()) do
if v:IsA("BasePart") then
table.insert(baseParts, v)
end
findAllBasePartsDescendants(v) -- It gives me an error at this line. (unknown global)
end
end
findAllBasePartsDescendants(model)
for k, v in pairs(baseParts) do
if v.Transparency > 0 then
v.Transparency = v.Transparency - 0.05
end
wait()
end
I'm trying to make a model decrease in transparency smoothly. This is a normal script in the model, which has only 5 parts..
