Skip to content
function since v0.1

loadChildren

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

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

Parameters

parent : Instance

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

predicate : (ModuleScript) -> boolean

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


Learn More