generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Get all parts in region3?

Previous Thread :: Next Thread 
OldGoldie is not online. 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 is not online. 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 is online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
06 Nov 2015 01:32 PM
there's literally a method called
:FindPartsInRegion3()
Report Abuse
direMitten is not online. direMitten
Joined: 18 Jun 2015
Total Posts: 1294
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image