Class
DraftsService
NotCreatableServiceNotReplicated
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
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild