How do I put more than 1 table instance in a parameter?

I was working on a region3 script that would relocate parts if they were caught up in there but I tried finding a way to put multiple parts in the region 3 parameter but it only takes 1. I tried using a table but that doesn’t seem to help either since I have to put in a specific table instance but I want the whole table, not a specific one, so I’m trying to see if there is a way to do this.

Example

local parent = script.Parent
local baseplate = workspace.Baseplate
local ignore = {baseplate, parent}
local itemcount = 0**

local region = Region3.new(parent.Position - parent.Size/2, parent.Position + parent.Size/2)

wait(5)

Image

1 Like

You would be better off using GetPartBoundsInRadius as the new OverlapParams allows you to have a descendants table and tell the function to either treat it as a blacklist or a whitelist. Also the added benefit of this being a spherical region as apposed to boxy, but if you want to keep it boxy there is a function for that too: GetPartBoundsInBox. Same as GetPartBoundsInRadius but has a boxy region instead of spherical.

Also FindPartsInRegion3 is deprecated in favor of GetPartBoundsInRadius.

Resources for the two:
https://developer.roblox.com/en-us/api-reference/function/WorldRoot/GetPartBoundsInRadius
https://developer.roblox.com/en-us/api-reference/datatype/OverlapParams

1 Like

Ok, thank you ill take a look at these two.

You’d need to make it so that baseplate and parent share the same parent.