LuaSourceContainer

Every Luau script in Stroke grows from this one: modules, Play scripts, tools and reactive nodes all hold their source the same way.

LuaSourceContainer is the base of everything holding Luau Source: ModuleScript (and through it InitScript, TypeScript, ClassNode and script layers), ToolScript and ReactiveNode. script:BindToClose(fn) sets a function to run when the script stops, on Stop or when Q reloads it, before what it changed is put back. It is never inserted on its own. See Scripts.

Properties

NameTypeDefault
SourcestringProperties window only

Methods

NameArgumentsReturnsDescription
BindToClose(callback: () -> ())()Registers a function that runs when the script is cleaned up, as on a hot reload, before its writes are put back.
From Instance 22

Subclasses