ForeverDev

Untitled

Oct 16th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. --EXAMPLE ONE: name changing
  2.  
  3. lq("&all|").attr("Name", "Test")  --select everything located in Workspace, change name to Test
  4.  
  5. lq("&direct|").attr("Name", "Test2")  --select everything only directly inside of Workspace, change name to Test2
  6.  
  7. --RESULT: http://i.imgur.com/58I6Eur.png
  8.  
  9.  
  10. --EXAMPLE TWO: destroy everything located inside of Model (which is located in Workspace)
  11.  
  12. lq("&all|", Workspace.Model).dest()
  13.  
  14. --you can also pass a callback for destroy, where normally you couldn't
  15.  
  16. lq("&all|", Workspace.Model).dest(function(object)
  17.     print(object.Name, "has been destroyed!")
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment