OldGoldie
|
  |
| Joined: 17 Aug 2010 |
| Total Posts: 8210 |
|
|
| 06 Nov 2015 01:16 PM |
| I need to get all the parts in a region3. How do I do this? |
|
|
| Report Abuse |
|
121bytes
|
  |
| Joined: 20 Aug 2014 |
| Total Posts: 250 |
|
|
| 06 Nov 2015 01:30 PM |
http://wiki.roblox.com/index.php?title=Region3
yudodis |
|
|
| Report Abuse |
|
Ultraw
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 6575 |
|
|
| 06 Nov 2015 01:32 PM |
there's literally a method called :FindPartsInRegion3() |
|
|
| Report Abuse |
|
|
| 06 Nov 2015 01:47 PM |
FindPartsinRegion3 will only find up to 100 parts, INCLUDING the ones in the ignore table. This makes it extremely limited for Regdion3s of any real size. There is a workaround, however. Parts outside of Workspace are NOT counted for the 100 part limit, so you can do something like this:
function getPartsInRegion3(r3) local partsInRegion3 = {} repeat local parts = game.Workspace:FindPartsInRegion3(re) for _, part in pairs(parts) do table.insert(partsInRegion3, {part = part, parent = part.Parent}) end until #parts == 0 for _, part in pairs(partsInRegion3) do part.part.Parent = part.parent end
return partsInRegion3 end |
|
|
| Report Abuse |
|