The method AddToFilter() on OverlapParams works as expected to add items to the filter, but it shows an error in the Script Analysis window when used:
Type Error: (122,2) Key ‘AddToFilter’ not found in class ‘OverlapParams’
Reproduces with the following code:
local parts = {}
local params: OverlapParams = OverlapParams.new()
params:AddToFilter(parts)
This method is documented here:
https://create.roblox.com/docs/reference/engine/datatypes/OverlapParams#AddToFilter