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. That's 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
| Name | Type | Default |
|---|---|---|
| Source | string |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| 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
