Advertisement
otorp2

roblox instance blocks and order them get desc

Dec 18th, 2017
456
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. function makeblocks(i)
  2. local block = Instance.new("Part")
  3. block.Parent = workspace
  4. local i = 0;
  5. for k,v in next,workspace:GetDescendants() do
  6. if v:IsA"BasePart" then
  7. i = i+1;
  8. v.Name = i;
  9. end;
  10. end;
  11.  
  12.  
  13. end
  14.  
  15. for i =1, 100 do
  16.  
  17. makeblocks(i)
  18. end
  19.  
  20.  
  21.  
  22. --function makeblocks(i)
  23. --
  24. -- local block = Instance.new("Part")
  25. -- block.Parent = workspace
  26. -- for _,v in pairs(workspace:GetChildren()) do
  27. -- if v:IsA("Part") then
  28. -- v.Name = tostring(i)
  29. -- end
  30. --end
  31. --end
  32. --
  33. --for i =1, 100 do
  34. -- makeblocks(i)
  35. -- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement