ModuleScript

Write code once and use it everywhere. Require a module from any script, starting with the animation helpers Stroke adds on its first start.

A ModuleScript holds Luau that other scripts load with require; what it returns is what they get. A module outside every Sandbox can be required from all of them, while requiring another Sandbox's module is an error. The first time Stroke starts, it adds AnimUtils and the modules it needs to Root.Modules, ready for require(Root.Modules.AnimUtils). While playing, an edited module waits for Q, which restarts only the scripts that use it.

Properties

NameTypeDefaultDescription
SourcestringThe Luau source the module holds.
From LuaSourceContainer 1
From Instance 22

Subclasses