Advertisement
jassm11

Untitled

Jul 12th, 2017
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. ------Server Cleanup------
  2.  
  3. local children = game.Workspace:GetChildren()
  4. for _, child in pairs(children) do
  5. for _, child in pairs(child:GetChildren()) do
  6. table.insert(children, child)
  7. end
  8.  
  9. if child.ClassName ~= "Terrain" and child:IsA("BasePart") then
  10. child:Destroy()
  11. end
  12. end
  13.  
  14. for i,v in pairs(Workspace:GetChildren()) do
  15. if v.Name == 'Terrain' then
  16. v:Clear()
  17.  
  18. end
  19.  
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement