TutorialClient
The client half of the bridge to TutorialServer.
A tutorial built with Replicate = true drives this module on its own, so most games never
touch it directly. It is exposed for the two cases the runtime does not cover: reacting to a
server decision without a Tutorial instance, and reporting progress the kit cannot observe.
const TutorialClient = require(Packages.TutorialKit).Client
TutorialClient.StepRequested:Connect(function(step)
print("server moved us to", step)
end)
Properties
StepRequested
eventsFires when the server puts this client on a step, via TutorialServer:SetStep.
CompleteRequested
eventsFires when the server ends this client's tutorial, via TutorialServer:Complete.
Functions
Start
This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts. YieldslifecycleTutorialClient:Start() → ()Connects to the bridge.
Idempotent, so every tutorial that replicates can call it. The first call yields while the
RemoteEvent replicates, which is why Tutorial.build yields when Replicate = true.
Errors
| Type | Description |
|---|---|
| "TutorialKit.Client is client only" | Called from the server |
Stop
lifecycleTutorialClient:Stop() → ()Disconnects from the bridge.
ReportStep
TutorialClient:ReportStep(step: number,--
Step reached
previousStep: number?--
Step left behind
) → ()Tells the server a step was reached.
A replicating tutorial does this for you. Call it by hand only for progress the kit cannot see, such as a tutorial beat that lives entirely in your own UI.
ReportCompleted
TutorialClient:ReportCompleted() → ()Tells the server the tutorial finished.