local RenderParts = {} for i,v in pairs(game.Workspace:GetChildren()) do if v.ClassName == "Part" then table.insert(RenderParts, v) elseif v.ClassName == "Model" then table.insert(RenderParts, v.ClassName("Model"):GetChildren()) end end
PlayerScripts.Render:6: attempt to call a string value
Use :GetDescendants() instead of :GetChildren()
to get every instance in the Workspace, instead of just the direct children.
Edit: Using GetDescendants, you can remove the part where it checks for the Model as it is not needed.