This function returns a description of a volume that contains all
BasePart children within a
Model. The volume’s orientation is based on the orientation of the
Model/PrimaryPart|PrimaryPart, and matches the selection box rendered in Studio when the model is selected. The description is provided in the form of a
DataType/CFrame orientation and
Mirroring the behavior of
Terrain/FillBlock, it returns a CFrame representing the center of that bounding box and a Vector3 representing its size.
If there is no PrimaryPart for the model, the BoundingBox will be aligned to the world axes.
Pictured below is a
Model with a pink semitransparent
BasePart/Size|Size have been set to the return values of this function called on the model.
local model = workspace.Model local part = workspace.Part local orientation, size = model:GetBoundingBox() part.Size = size part.CFrame = orientation