Skip to content
function since v0.1

loadDescendants

Preload the specified parent by requiring all ModuleScripts within it recursively. An optional predicate function can be provided to filter modules.

function prvd.loadDescendants(
  parent: Instance,
  predicate: ((ModuleScript) -> boolean)?
): { unknown }
export const loadDescendants: (
  parent: Instance,
  predicate?: (module: ModuleScript) => boolean
) => unknown[]

Parameters

parent : Instance

The parent to load ModuleScripts from. Internally uses :GetDescendants() to load modules.

predicate : (ModuleScript) -> boolean

An optional predicate function that will be called to filter the modules to load with.


Learn More