How to use GetBoundsInBox()

I’ve been searching and searching and experimenting but I can’t find a single thing that helps me do what I want to do.
I want a event to be casted and then a box made every time it is casted. Done.
I want to filter it so that the player that casted the box isn’t affected by it, and the people in the box are. I just have no Idea how to do this lol. Could someone not just simply write a script but give an explanation so I could use this on other projects as well. I was told on a different post it is a great alternative to hitboxes.

1 Like

Essentially what this does, is take the hitbox of a part, and return all colliding hitboxes from other parts. You know the box that appears when you hover your cursor over parts? That’s the bounding box, this is a great alternative to hitboxes because you don’t need to always fire .Touched.

1 Like

the GetBoundsInBox function is used to get parts inside of a bounding box. an invisible one, not a part. you put the cframe for the first parameter, and then the size. and then some params.


local part = workspace.Part

local overlaps =
overlaps.FilterDescendantsInstances = {part}
overlaps.FilterType = Enum.RaycastFilterType.Exclude

local partsInBox = workspace:GetPartBoundsInBox(,, 5, 5), overlaps)

this will return the parts in the bounding box, the invisible one. this is mainly used for zones. like the lighting zones


ive seen u before…


1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.