Hello I’m trying to detect a part using GetPartBoundsInRadius with an OverlapParam that checks for collision group, but nothing is being detected even though there’s clearly a part with the “Projectile” group at the position.
Code:
local params = OverlapParams.new()
params.MaxParts = 1
params.CollisionGroup = "Projectile"
params.FilterType = Enum.RaycastFilterType.Include
local objects = workspace:GetPartBoundsInRadius(Vector3.new(1300, 67, 100),10,params)
print(objects)
If you are confused that the print outputs the memory address of the table, make sure you have “log mode” disabled in the output. You can disable it in the three dots in the top right corner of the outpur window.
Specifies a collision group for the raycasting operation. Parts in collision groups that are set to not collide with this group are ignored (<-- THIS). If this property is omitted, the raycast assumes the Default collision group.
You’ve set your params to only look at objects within the included list, but did not include a list. I’ve not tested this personally but I would think that means nothing will ever be returned. Either remove this Include or add where the part you want to find is within the filter list
For some reason I thought FilterType would include any objects that match the properties in the OverlapParam, is there any way I could only look for parts with the collision group “Projectile” without adding a list?