Advertisement
koreanhackerman

How to delete workspace

Dec 4th, 2019
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. -- lua version:
  2. for _, child in pairs(game.Workspace:GetChildren()) do
  3. child:Destroy()
  4. end
  5.  
  6. -- lua c version
  7. getglobal game
  8. getfield -1 Workspace
  9. getfield -1 Destroy
  10. pushvalue -2
  11. pcall 1 0 0
  12.  
  13. -- or this :
  14. asgw = game.Workspace:GetChildren()
  15.  
  16. for i,v in pairs(asgw) do
  17.     if v.Name ~= "Terrain" and v.Name ~= "Camera" then
  18.         v:Destroy()
  19.     end
  20. end
  21.  
  22. -- or this ! :
  23.  
  24. workspace:ClearAllChildren()
  25.  
  26. -- ok you can choose any of them all work
  27. --bye
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement