Roblox UtilitiesDevlHub Roblox Documentation

Class

DraftsService

NotCreatableServiceNotReplicated
Inherits
Instance › Object
Memory category
Instances

A Studio service that manages script drafts in a Team Create session with collaborative editing enabled.

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").

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed