Your First Chapter
What is a Chapter?
Writing a Chapter
local Players = game:GetService("Players")
local function player_added(player: Player)
print(player.Name .. " has joined the game!")
end
local function state_something(statement: string)
print(statement)
end
-- "init" is a lifecycle hook that always runs first!
local function init()
Players.PlayerAdded:Connect(player_added)
end
return {
priority = 1, -- This Chapter isn't important, so a low priority is OK.
init = init,
player_added = player_added,
state_something = state_something,
}Using a Chapter
Summary
Last updated