Forest Logo
search
package_2

module-loader

By @termsofgit

Roblox

Mirrored

Tutorial

Wally

Shared player lifecycle hooks

Loaded modules can optionally define any of these methods:

function Module:PlayerAdded(player: Player) end
function Module:PlayerRemoving(player: Player) end
function Module:CharacterAdded(player: Player, character: Model) end
function Module:CharacterRemoving(player: Player, character: Model) end

The loader owns the Roblox event connections and forwards events to every module that implements the corresponding method. Players and characters that already exist when loading finishes are passed through PlayerAdded and CharacterAdded after Init and Start.

Modules may return any value. Lifecycle methods are only inspected and invoked when the returned value is a table.

Package Details

Install command (Click to copy)


Version

3.1.0

License

MIT

check_circle

Safe for commercial use

Automated license review — not legal advice.