Service · inherits Instance
DraftsService
A Studio service that manages script drafts in a Team Create session with collaborative editing enabled.
About DraftsService
DraftsService backs the collaborative editing "drafts" workflow in a Team
Create session. When collaborative editing is enabled, a collaborator's
changes to a Script, LocalScript, or ModuleScript are
kept as a local draft rather than being applied to the shared session copy
immediately, and a draft must be committed before other collaborators receive
it.
The service exposes the operations behind Studio's Drafts interface.
GetDrafts() enumerates the current drafts, GetDraftStatus() reports a
draft's status, and GetEditors() lists the collaborators editing a given
script. CommitEdits() and DiscardEdits() publish or drop changes;
RestoreScripts() and UpdateToLatestVersion() reconcile local drafts with
the server; and ShowDiffsAgainstBase() and ShowDiffsAgainstServer() open
diff views. Events including DraftAdded, DraftRemoved,
DraftStatusChanged, and EditorsListChanged fire as drafts and their
editors change.
DraftsService is a Studio-only service; retrieve it with
game:GetService("DraftsService").
DraftsService also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.