I’m testing this code (put in StarterCharacterScripts) to detect overlaps excluding parts inside the model:
Note: This code is just a demonstration of the issue
-- Test.lua
local RunService = game:GetService("RunService")
local testModel = Instance.new("Model")
local part = Instance.new("Part")
part.Anchored = true
part.CanCollide = true
part.CanTouch = true
part.Position = Vector3.new(0, 5, 0)
part.Size = Vector3.new(4, 4, 4)
part.CollisionGroup = "Test"
part.Parent = testModel
testModel.PrimaryPart = part
testModel.Parent = workspace
local overlapParams = OverlapParams.new()
overlapParams.FilterType = Enum.RaycastFilterType.Exclude
overlapParams.FilterDescendantsInstances = { testModel }
RunService.RenderStepped:Connect(function()
local overlapParts = workspace:GetPartBoundsInBox(
testModel:GetPivot(),
testModel:GetExtentsSize() + Vector3.new(0.1, 0.1, 0.1),
overlapParams
)
print("Overlaps:", #overlapParts)
for _, p in ipairs(overlapParts) do
print(" -", p:GetFullName())
end
end)
I made a collision group called Test in Studio, set it to not collide with Default but collide with itself.
The problem is that the placed parts in the Test group that overlap with each other don’t show up in the print statements of the overlapParts table. This feels like a bug or a limitation since the code and collision settings look correct.
Is there any fix or way around this? I also want to keep CanCollide off no matter what (even though it was on in the test script above).

