Type Error: (117,2) Key 'AddToFilter' not found in class 'OverlapParams'

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

2 Likes

Thanks for the report! I filed a ticket in our internal database and we’ll follow up when we have an update for you.