Data type
OverlapParams
Stores parameters used in boundary-querying functions.
About OverlapParams
The OverlapParams data type stores parameters for use with
WorldRoot boundary-querying functions, in particular
WorldRoot.GetPartBoundsInBox,
WorldRoot.GetPartBoundsInRadius and
WorldRoot.GetPartsInPart. The
ExcludeInstances and
IncludeInstances properties store a
set of objects and their descendants that will be excluded and included from
the query. The OverlapParams.CollisionGroup property can specify a
collision group for the boundary query operation.
Unlike most data types in Luau, you can change all of the members of
OverlapParams without creating a new object, allowing you to reuse
the same object repeatedly.
Constructors 1
OverlapParams.new
()Returns a blankOverlapParamsobject.
Properties 9
ExcludeInstances
: {Instance}?An optional array of instances whose descendants will be excluded from the query.An optional array of instances whose descendants will be excluded from the query. This property can be used simultaneously with
IncludeInstancesto allow for mixed filtering, for example including a large folder but excluding specific child instances. If an instance matches both an exclude and include filter, exclusions take priority over inclusions.IncludeInstances
: {Instance}?An optional array of instances whose descendants will be included in the query.An optional array of instances whose descendants will be included in the query. This property can be used simultaneously with
ExcludeInstancesto allow for mixed filtering. If an instance matches both an exclude and include filter, exclusions take priority over inclusions.Setting
IncludeInstancestonilversus an empty array ({}) has opposite effects.IncludeInstances = nilis the most permissive filter (includes everything), whereasIncludeInstances = {}is the most restrictive filter (includes nothing).MaxParts
: numberThe maximum amount of parts to be returned by the query.The maximum amount of parts to be returned by the query. The default value of zero (
0) represents no limit.CollisionGroup
: stringThe collision group used for the operation.Specifies a collision group for the operation. Parts in collision groups that are set to not collide with this group are ignored. If this property is omitted, the operation assumes the Default collision group.
Tolerance
: numberSlightly increases the volume of the boundary-querying operation.Slightly increases the volume of the boundary-querying operation, clamped between
0and0.05studs.RespectCanCollide
: boolDetermines whether the boundary-querying operation considers a part'sBasePart.CanCollideproperty value over itsBasePart.CanQueryvalue.This property, if
true, makes the boundary-querying operation use an intersected part'sBasePart.CanCollidevalue in favor of itsBasePart.CanQueryvalue when determining whether that part is included in the array of spatial query results.BruteForceAllSlow
: boolWhen enabled, the query will ignore all part collision properties and perform a brute-force check on every part.When enabled, the query will ignore all part collision properties and perform a brute-force check on every part. This will negatively impact performance and should not be used in live experiences.
FilterDescendantsInstances
: ArrayAn array of objects whose descendants are used in filtering candidates.An array of objects whose descendants are used in filtering candidates. Note that this property has been superseded by
ExcludeInstancesandIncludeInstanceswhich should be used for new work.FilterType
: RaycastFilterTypeDetermines whether theFilterDescendantsInstancesarray is used as an exclude or include list.Determines whether the
FilterDescendantsInstancesarray is used as an exclude or include list. Note that this property has been superseded byExcludeInstancesandIncludeInstanceswhich should be used for new work.
Methods 1
AddToFilter
(instances: Instance | Array) → ()Adds the instances provided toFilterDescendantsInstances.Adds the instances provided to
FilterDescendantsInstances. Note that this property has been superseded byExcludeInstancesandIncludeInstanceswhich should be used for new work.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.