Skip to content

insert -> Tasks...

function Fusion.insert<Tasks...>(
    scope: Scope<unknown>,
    ...: Tasks...
): Tasks...

Inserts destruction tasks passed in to the scope. Returns the clean up tasks to be used for variable declarations.

Use scoped() method syntax

This function is intended to be accessed as a method on a scope:

local conn, ins = scope:insert(
    RunService.Heartbeat:Connnect(doUpdate),
    Instance.new("Part", workspace)
)


Parameters

scope : Scope<unknown>

The scope which should be used to store destruction tasks.

... : Tasks...

The destruction tasks which should be inserted into the scope.


Returns -> Tasks...

The destruction tasks that has been inserted into the scope.


Learn More

Back to top