Skip to content
Saiko

filtergc

Searches garbage-collected memory with precise filters. Far faster and more targeted than walking getgc by hand, and the standard way to recover a game function or internal table.

Signature

luau
filtergc(filterType: "function" | "table", filterOptions: table, returnOne: boolean?): any

Parameters

filterType"function" | "table"

Which kind of value to look for.

filterOptionstable

Match rules: Name, Constants, Upvalues, IgnoreExecutor for functions; Keys, Values, KeyValuePairs, Metatable for tables.

returnOneboolean?

Return the first match instead of a list.

Returns

any

Example

luau
local fn = filtergc("function", {
    Name = "onDamage",
    IgnoreExecutor = true
}, true)