Reference API Roblox

Engine API

Website

Related

Reference API Roblox

StudioService

Provides access to configuration of Roblox Studio and allows importing files from the user's file system.

This class is not replicated. Its interface does not cross the network boundary.
This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
Tags: [NotCreatable, Service, NotReplicated]

Member index 48

HistoryMember
553ActiveScript: Instance
553DraggerSolveConstraints: bool
575DrawConstraintsOnTop: bool
553GridSize: float
553RotateIncrement: float
623Secrets: string
553ShowConstraintDetails: bool
640ShowWeldDetails: bool
553StudioLocaleId: string
553UseLocalSpace: bool
573AnimationIdSelected(id: int64): null
573CopyToClipboard(stringToCopy: string): null
472GetBadgeConfigureUrl(badgeId: int64): string
472GetBadgeUploadUrl(): string
462GetClassIcon(className: string): Dictionary
506GetPlaceIsPersistedToCloud(): bool
462GetResourceByCategory(category: string): Dictionary
462GetStartupAssetId(): string
462GetStartupPluginId(): string
462GetTermsOfUseUrl(): string
462GetUserId(): int64
638GizmoRaycast(origin: Vector3, direction: Vector3, raycastParams: RaycastParams = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): RaycastResult?
462HasInternalPermission(): bool
462IsPluginInstalled(assetId: int64): bool
462IsPluginUpToDate(assetId: int64, currentAssetVersion: int64): bool
573OpenInBrowser_DONOTUSE(url: string): null
462PromptImportFile(fileTypeFilter: Array = {}): Instance
648PromptImportFiles(fileTypeFilter: Array = {}): Instances
573RequestClose(closeMode: StudioCloseMode): null
573SetPluginEnabled(assetId: int64, state: bool): null
573ShowPlaceVersionHistoryDialog(placeId: int64): null
573ShowPublishToRoblox(): null
573TryInstallPlugin(assetId: int64, assetVersionId: int64): null
573UninstallPlugin(assetId: int64): null
573UpdatePluginManagement(): null
462OnImportFromRoblox()
462OnOpenGameSettings(pageIdentifier: string)
462OnOpenManagePackagePlugin(userId: int64, assetId: int64)
462OnPluginInstalledFromToolbox()
462OnPluginInstalledFromWeb(pluginId: string)
648OnPublishAsPlugin(instances: Instances)
648OnSaveToRoblox(instances: Instances)
462PromptTransformPluginCheckEnable()
478SaveLocallyAsComplete(success: bool)
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Removed member index 45

HistoryMember
493BaseURLHasChineseHost(): bool
520ConvertToPackageUpload(uploadUrl: string): void
535DEPRECATED_EmitPlacePublishedSignal(): void
535DEPRECATED_RefreshDocumentDisplayName(): void
519DEPRECATED_SetDocumentDisplayName(newName: string): void
521DEPRECATED_SetTurnOnTeamCreateOnPublish(turnOn: bool): void
535DEPRECATED_SetUniverseDisplayName(newName: string): void
464DEPRECATED_ShowPlaceVersionHistoryDialog(): void
535DEPRECATED_ShowSaveOrPublishPlaceToRoblox(showGameSelect: bool, isPublish: bool, closeMode: StudioCloseMode): void
535DEPRECATED_publishAs(universeId: int64, placeId: int64, groupId: int64): void
530EmitPlacePublishedSignal(): void
404GetInstalledPluginData(): string
528GetUserIsInTeamCreateToggleRamp(): bool
424LaunchBulkImport(assetTypeToImport: int): void
458OpenPluginInsertPage(assetId: int64): void
505PromptForLocalSave(): void
492PromptImportLocalAsset(prompt: string, fileTypeFilter: Array = {}): Instance
492PromptImportLocalAssets(prompt: string, fileTypeFilter: Array = {}): Objects
530PublishAs(universeId: int64, placeId: int64, groupId: int64): void
530RefreshDocumentDisplayName(): void
479RequestCloseStudio(): void
524SerializeInstances(instances: Objects): string
505SetDocumentDisplayName(newName: string): void
513SetTurnOnTeamCreateOnPublish(turnOn: bool): void
530SetUniverseDisplayName(newName: string): void
424ShowBulkImportView(): void
530ShowSaveOrPublishPlaceToRoblox(showGameSelect: bool, isPublish: bool, closeMode: StudioCloseMode): void
402emitPlacePublishedSignal(): void
424BulkImportFinished(state: int)
535DEPRECATED_GameNameUpdated(name: string)
535DEPRECATED_GamePublishFinished(success: bool, gameId: int64)
535DEPRECATED_OnPublishPlaceToRoblox(isOverwritePublish: bool)
535DEPRECATED_OnSaveOrPublishPlaceToRoblox(showGameSelect: bool, isPublish: bool, closeMode: StudioCloseMode)
505FirstPublishOfCloudPlace(universeId: int64, placeId: int64)
530GameNameUpdated(name: string)
530GamePublishFinished(success: bool, gameId: int64)
402GamePublishedToRoblox()
520OnConvertToPackageResult(isSuccessful: bool, errorMessage: string)
520OnOpenConvertToPackagePlugin(instances: Objects, name: string)
530OnPublishPlaceToRoblox(isOverwritePublish: bool)
530OnSaveOrPublishPlaceToRoblox(showGameSelect: bool, isPublish: bool, closeMode: StudioCloseMode)
402PlacePublishedToRoblox()

Description

StudioService provides access to configuration of Roblox Studio, allows importing files from the user's file system, and other miscellaneous information. It is intended to be used by Plugins in order to provide a consistent user experience.

History 268

Members 48

ActiveScript

TypeDefault
Instance

ActiveScript refers to the LuaSourceContainer currently being edited by the user. If the user is not editing a script, this will be nil. Below is an example that shows how you can use this property to measure for how long a script was active.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
local StudioService = game:GetService("StudioService")

local startTime = os.time()
local activeScript
local function onActiveScriptChanged()
  local newActiveScript = StudioService.ActiveScript

	if activeScript and newActiveScript ~= activeScript then
		local deltaTime = os.time() - startTime
		print(("You edited %s for %d:%2.d"):format(activeScript.Name, deltaTime // 60, deltaTime % 60))
	end
	startTime = os.time()
	activeScript = newActiveScript
end

StudioService:GetPropertyChangedSignal("ActiveScript"):Connect(onActiveScriptChanged)
This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 4

Tags: [ReadOnly, NotReplicated]

AnimationIdSelected

Parameters (1)
idint64
Returns (1)
null

History 3

CopyToClipboard

Parameters (1)
stringToCopystring
Returns (1)
null

History 3

DraggerSolveConstraints

TypeDefault
bool
This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 4

Tags: [ReadOnly, NotReplicated]

DrawConstraintsOnTop

TypeDefault
bool
This property is deprecated. It exists only for backward compatibility, and should not be used for new work.
This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 5

Tags: [ReadOnly, NotReplicated, Deprecated]

GetBadgeConfigureUrl

Parameters (1)
badgeIdint64
Returns (1)
string

History 1

GetBadgeUploadUrl

Parameters (0)
No parameters.
Returns (1)
string

History 1

GetClassIcon

Parameters (1)
classNamestring
Returns (1)
Dictionary

GetClassIcon provides a dictionary that allows the display of a class' Explorer window icon, e.g. calling this function with "Part" returns property values that display the part icon from the Explorer window.

Below is a literal table representation of the value returned when this function is called with "Part".

{
	Image = "rbxasset://textures/ClassImages.png",
	ImageRectOffset = Vector2.new(16, 0),
	ImageRectSize = Vector2.new(16, 16)
}

The utility function below may prove useful when displaying class icons:

1
2
3
4
5
6
7
8
local StudioService = game:GetService("StudioService")
local imageLabel = script.Parent
local function displayClassIcon(image, className)
	for k, v in StudioService:GetClassIcon(className) do
		image[k] = v -- Set property
	end
end
displayClassIcon(imageLabel, "Part")

History 2

GetPlaceIsPersistedToCloud

Parameters (0)
No parameters.
Returns (1)
bool

History 1

GetResourceByCategory

Parameters (1)
categorystring
Returns (1)
Dictionary

History 2

GetStartupAssetId

Parameters (0)
No parameters.
Returns (1)
string

History 2

GetStartupPluginId

Parameters (0)
No parameters.
Returns (1)
string

History 2

GetTermsOfUseUrl

Parameters (0)
No parameters.
Returns (1)
string

History 2

GetUserId

Parameters (0)
No parameters.
Returns (1)
int64

Returns the Studio user's userId if they're logged in, otherwise returns 0.

History 3

GizmoRaycast

Parameters (3)Default
originVector3
directionVector3
raycastParamsRaycastParamsRaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}
Returns (1)
RaycastResult?

History 9

GridSize

TypeDefault
float

GridSize determines the distance in studs by which Studio's drag and move tools move objects each tick. This is set in the user's Model tab under the Snap to Grid section.

Transform snapping tools indicated in Model tab
This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 4

Tags: [ReadOnly, NotReplicated]

HasInternalPermission

Parameters (0)
No parameters.
Returns (1)
bool

History 2

IsPluginInstalled

Parameters (1)
assetIdint64
Returns (1)
bool

History 2

IsPluginUpToDate

Parameters (2)
assetIdint64
currentAssetVersionint64
Returns (1)
bool

History 2

OnImportFromRoblox

Parameters (0)
No parameters.

History 2

OnOpenGameSettings

Parameters (1)
pageIdentifierstring

History 4

OnOpenManagePackagePlugin

Parameters (2)
userIdint64
assetIdint64

History 2

OnPluginInstalledFromToolbox

Parameters (0)
No parameters.

History 2

OnPluginInstalledFromWeb

Parameters (1)
pluginIdstring

History 2

OnPublishAsPlugin

Parameters (1)
instancesInstances

History 3

OnSaveToRoblox

Parameters (1)
instancesInstances

History 3

OpenInBrowser_DONOTUSE

Parameters (1)
urlstring
Returns (1)
null

History 3

PromptImportFile

Parameters (1)Default
fileTypeFilterArray{}
Returns (1)
Instance

This function prompts the current Studio user to select one file, which will then be loaded as a File.

See also:

This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

PromptImportFiles

Parameters (1)Default
fileTypeFilterArray{}
Returns (1)
Instances

This function prompts the current Studio user to select one or more files, which will then be loaded as Files.

Throws an error if the fileTypeFilter was an empty list.

See also:

This function yields. It will block the calling thread until completion.

History 3

Tags: [Yields]

PromptTransformPluginCheckEnable

Parameters (0)
No parameters.

History 2

RequestClose

Parameters (1)
closeModeStudioCloseMode
Returns (1)
null

History 2

RotateIncrement

TypeDefault
float

RotateIncrement determines the angle in degrees by which Studio's rotation tool will rotate selected objects each tick. This is set in the user's Model tab under the Snap to Grid section.

Transform snapping tools indicated in Model tab
This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 4

Tags: [ReadOnly, NotReplicated]

SaveLocallyAsComplete

Parameters (1)
successbool

History 1

Secrets

TypeDefault
string

History 1

SetPluginEnabled

Parameters (2)
assetIdint64
statebool
Returns (1)
null

History 3

ShowConstraintDetails

TypeDefault
bool
This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 4

Tags: [ReadOnly, NotReplicated]

ShowPlaceVersionHistoryDialog

Parameters (1)
placeIdint64
Returns (1)
null

History 4

ShowPublishToRoblox

Parameters (0)
No parameters.
Returns (1)
null

History 3

ShowWeldDetails

TypeDefault
bool
This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 1

Tags: [ReadOnly, NotReplicated]

StudioLocaleId

TypeDefault
string

The StudioLocaleId property contains the locale currently in-use by Studio, e.g. en_US. It is useful when localizing plugins.

Below is a trivial example of localization based on the value returned by this function.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
local locale = game:GetService("StudioService").StudioLocaleId
if locale == "en_US" then
	print("Howdy, ya'll")
elseif locale == "en_GB" then
	print("'Ello, gov'na")
elseif locale:sub(1, 2) == "en" then
	print("Hello")
elseif locale == "fr_FR" then
	print("Bonjour")
end
This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 4

Tags: [ReadOnly, NotReplicated]

TryInstallPlugin

Parameters (2)
assetIdint64
assetVersionIdint64
Returns (1)
null
This function yields. It will block the calling thread until completion.

History 3

Tags: [Yields]

UninstallPlugin

Parameters (1)
assetIdint64
Returns (1)
null

History 3

UpdatePluginManagement

Parameters (0)
No parameters.
Returns (1)
null

History 3

UseLocalSpace

TypeDefault
bool

UseLocalSpace determines whether the Studio movement/rotation tools will manipulate a part's CFrame using the local space of an object or global space. By default, this setting is toggled with CtrlL or L. Plugins can read from this property if they implement their own object movement tools.

This property is not replicated. Its interface does not cross the network boundary.

History 4

Tags: [NotReplicated]

Removed members 45

BaseURLHasChineseHost

Parameters (0)
No parameters.
Returns (1)
bool

History 3

BulkImportFinished

Parameters (1)
stateint

History 2

ConvertToPackageUpload

Parameters (1)
uploadUrlstring
Returns (1)
void

History 4

DEPRECATED_EmitPlacePublishedSignal

Parameters (0)
No parameters.
Returns (1)
void

History 2

DEPRECATED_GameNameUpdated

Parameters (1)
namestring

History 2

DEPRECATED_GamePublishFinished

Parameters (2)
successbool
gameIdint64

History 2

DEPRECATED_OnPublishPlaceToRoblox

Parameters (1)
isOverwritePublishbool

History 5

DEPRECATED_OnSaveOrPublishPlaceToRoblox

Parameters (3)
showGameSelectbool
isPublishbool
closeModeStudioCloseMode

History 2

DEPRECATED_RefreshDocumentDisplayName

Parameters (0)
No parameters.
Returns (1)
void

History 2

DEPRECATED_SetDocumentDisplayName

Parameters (1)
newNamestring
Returns (1)
void

History 2

DEPRECATED_SetTurnOnTeamCreateOnPublish

Parameters (1)
turnOnbool
Returns (1)
void

History 2

DEPRECATED_SetUniverseDisplayName

Parameters (1)
newNamestring
Returns (1)
void

History 2

DEPRECATED_ShowPlaceVersionHistoryDialog

Parameters (0)
No parameters.
Returns (1)
void

History 3

DEPRECATED_ShowSaveOrPublishPlaceToRoblox

Parameters (3)
showGameSelectbool
isPublishbool
closeModeStudioCloseMode
Returns (1)
void

History 2

DEPRECATED_publishAs

Parameters (3)
universeIdint64
placeIdint64
groupIdint64
Returns (1)
void

History 2

EmitPlacePublishedSignal

Parameters (0)
No parameters.
Returns (1)
void

History 3

FirstPublishOfCloudPlace

Parameters (2)
universeIdint64
placeIdint64

History 2

GameNameUpdated

Parameters (1)
namestring

History 3

GamePublishFinished

Parameters (2)
successbool
gameIdint64

History 4

GamePublishedToRoblox

Parameters (0)
No parameters.

History 2

GetInstalledPluginData

Parameters (0)
No parameters.
Returns (1)
string
This function yields. It will block the calling thread until completion.

History 2

Tags: [Yields]

GetUserIsInTeamCreateToggleRamp

Parameters (0)
No parameters.
Returns (1)
bool

History 2

LaunchBulkImport

Parameters (1)
assetTypeToImportint
Returns (1)
void

History 4

OnConvertToPackageResult

Parameters (2)
isSuccessfulbool
errorMessagestring

History 4

OnOpenConvertToPackagePlugin

Parameters (2)
instancesObjects
namestring

History 4

OnPublishPlaceToRoblox

Parameters (1)
isOverwritePublishbool

History 4

OnSaveOrPublishPlaceToRoblox

Parameters (3)
showGameSelectbool
isPublishbool
closeModeStudioCloseMode

History 4

OpenPluginInsertPage

Parameters (1)
assetIdint64
Returns (1)
void

History 2

PlacePublishedToRoblox

Parameters (0)
No parameters.

History 2

PromptForLocalSave

Parameters (0)
No parameters.
Returns (1)
void

History 2

PromptImportLocalAsset

Parameters (2)Default
promptstring
fileTypeFilterArray{}
Returns (1)
Instance
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.
This function yields. It will block the calling thread until completion.

History 4

Tags: [Yields, Deprecated]

PromptImportLocalAssets

Parameters (2)Default
promptstring
fileTypeFilterArray{}
Returns (1)
Objects
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.
This function yields. It will block the calling thread until completion.

History 4

Tags: [Yields, Deprecated]

PublishAs

Parameters (3)
universeIdint64
placeIdint64
groupIdint64
Returns (1)
void

History 4

RefreshDocumentDisplayName

Parameters (0)
No parameters.
Returns (1)
void

History 2

RequestCloseStudio

Parameters (0)
No parameters.
Returns (1)
void

History 2

SerializeInstances

Parameters (1)
instancesObjects
Returns (1)
string

History 3

SetDocumentDisplayName

Parameters (1)
newNamestring
Returns (1)
void

History 3

SetTurnOnTeamCreateOnPublish

Parameters (1)
turnOnbool
Returns (1)
void

History 2

SetUniverseDisplayName

Parameters (1)
newNamestring
Returns (1)
void

History 3

ShowBulkImportView

Parameters (0)
No parameters.
Returns (1)
void

History 2

ShowSaveOrPublishPlaceToRoblox

Parameters (3)
showGameSelectbool
isPublishbool
closeModeStudioCloseMode
Returns (1)
void

History 3

emitPlacePublishedSignal

Parameters (0)
No parameters.
Returns (1)
void

History 2

Settings