3 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Region3

The Region3 data type describes a volume in 3D space similar to an axis-aligned rectangular prism. It is commonly used with Terrain functions and functions that detect parts within a volume, such as WorldRoot:FindPartsInRegion3().

The prism's center is accessible using the Region3.CFrame property and the prism's size is accessible through the Region3.Size property. Note that the components of this property may be negative.

The Region3:ExpandToGrid() method returns a new Region3 whose bounds comply with a provided resolution value. The resulting volume may be equal to or greater than the original volume, but never smaller.

See also:

Constructors

NameType / ReturnsDescription
Region3.newReturns a new Region3 using the provided vectors as boundaries.

Region3.new

Returns a new Region3 given the Vector3 bounds of the rectangular prism volume.

Note that the order of the provided bounds matters: by switching them, the polarity of the size components will switch. It is possible to create a Region3 with a negative volume.

Parameters

NameTypeDefaultDescription
minVector3The lower corner of the rectangular volume.
maxVector3The upper corner of the rectangular volume.

Properties

NameType / ReturnsDescription
Region3.CFrameCFrameThe center location and rotation of the Region3.
Region3.SizeVector3The 3D size of the Region3.

Region3.CFrame

The CFrame representing the center position and orientation of the Region3. The position component is the midpoint of the min and max vectors passed to Region3.new(), computed as (min + max) / 2. Because a Region3 is always axis-aligned, the rotation component of the returned CFrame is always the identity (no rotation). This property is read-only.

FieldValue
typeCFrame

Region3.Size

The size of the Region3 as a Vector3, equal to max - min from the constructor arguments. Individual components may be negative if the corresponding component of min is greater than max in the call to Region3.new(). This property is read-only.

FieldValue
typeVector3

Methods

NameType / ReturnsDescription
Region3:ExpandToGridRegion3Expands the Region3 to fit a grid based on the provided resolution.

Region3:ExpandToGrid

Expands the Region3 based on the provided resolution and returns the expanded Region3 aligned to the Terrain voxel grid.

Parameters

NameTypeDefaultDescription
resolutionnumberThe grid resolution to align the region bounds to, in studs. Must be a positive number.

Returns

TypeDescription
Region3A new Region3 whose minimum bounds are floored and maximum bounds are ceiled to the nearest multiple of resolution.