Roblox API Reference

StudioService On DevHub

Summary

This class is not creatable. An object of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
This item is not replicated. Its interface does not cross the network boundary.

Tags: [NotCreatable, Service, NotReplicated]

Inherits (1)

Member index (46)

Type Member History
Instance ActiveScript
bool AlignDraggedObjects 440 469
bool DraggerSolveConstraints 422
bool DrawConstraintsOnTop 425 575
float GridSize 400
Instance HoverInstance 431 469 469
string InstalledPluginData 404 469
bool PivotSnapToGeometry 470
float RotateIncrement 400
bool ShowConstraintDetails 422
string StudioLocaleId 387
bool UseLocalSpace 400
null AnimationIdSelected (int64 id) 428 573
null CopyToClipboard (string stringToCopy) 364 573
string GetBadgeConfigureUrl (int64 badgeId) 472
string GetBadgeUploadUrl () 472
Dictionary GetClassIcon (string className) 375
bool GetPlaceIsPersistedToCloud () 506
Dictionary GetResourceByCategory (string category) 396
string GetStartupAssetId () 446
string GetStartupPluginId () 404
string GetTermsOfUseUrl () 437
int64 GetUserId () 379 418
RaycastResult GizmoRaycast (Vector3 origin, Vector3 direction, RaycastParams raycastParams = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}) 420 422 438 509 549
bool HasInternalPermission () 440
bool IsPluginInstalled (int64 assetId) 398
bool IsPluginUpToDate (int64 assetId, int64 currentAssetVersion) 398
null OpenInBrowser_DONOTUSE (string url) 409 573
Instance PromptImportFile (Array fileTypeFilter = {}) 372
Objects PromptImportFiles (Array fileTypeFilter = {}) 372
null RequestClose (StudioCloseMode closeMode) 479 573
null SetPluginEnabled (int64 assetId, bool state) 399 573
null ShowPlaceVersionHistoryDialog (int64 placeId) 433 447 573
null ShowPublishToRoblox () 370 573
null TryInstallPlugin (int64 assetId, int64 assetVersionId) 398 573
null UninstallPlugin (int64 assetId) 399 573
null UpdatePluginManagement () 399 573
OnImportFromRoblox () 428
OnOpenGameSettings (string pageIdentifier) 443 442 443
OnOpenManagePackagePlugin (int64 userId, int64 assetId) 396
OnPluginInstalledFromToolbox () 399
OnPluginInstalledFromWeb (string pluginId) 404
OnPublishAsPlugin (Objects instances) 406
OnSaveToRoblox (Objects instances) 382
PromptTransformPluginCheckEnable () 451
SaveLocallyAsComplete (bool success) 478
57 members inherited from Instance

Removed member index (44)

Type Member History
bool DEPRECATED_ShowActiveInstanceHighlight 574 580
bool ShowActiveInstanceHighlight 438 469 469 574
bool BaseURLHasChineseHost () 441 493
void ConvertToPackageUpload (string uploadUrl) 401 416 520
void DEPRECATED_EmitPlacePublishedSignal () 530 535
void DEPRECATED_RefreshDocumentDisplayName () 530 535
void DEPRECATED_SetDocumentDisplayName (string newName) 505 519
void DEPRECATED_SetTurnOnTeamCreateOnPublish (bool turnOn) 513 521
void DEPRECATED_SetUniverseDisplayName (string newName) 530 535
void DEPRECATED_ShowPlaceVersionHistoryDialog () 447 464
void DEPRECATED_ShowSaveOrPublishPlaceToRoblox (bool showGameSelect, bool isPublish, StudioCloseMode closeMode) 530 535
void DEPRECATED_publishAs (int64 universeId, int64 placeId, int64 groupId) 530 535
void EmitPlacePublishedSignal () 402 530
string GetInstalledPluginData () 399 404
bool GetUserIsInTeamCreateToggleRamp () 506 528
void LaunchBulkImport (int assetTypeToImport) 417 419 419 424
void OpenPluginInsertPage (int64 assetId) 364 458
void PromptForLocalSave () 477 505
Instance PromptImportLocalAsset (string prompt, Array fileTypeFilter = {}) 369 372 492
Objects PromptImportLocalAssets (string prompt, Array fileTypeFilter = {}) 369 372 492
void PublishAs (int64 universeId, int64 placeId, int64 groupId) 396 423 530
void RefreshDocumentDisplayName () 506 530
void RequestCloseStudio () 475 479
string SerializeInstances (Objects instances) 390 524
void SetDocumentDisplayName (string newName) 436 505
void SetTurnOnTeamCreateOnPublish (bool turnOn) 506 513
void SetUniverseDisplayName (string newName) 364 530
void ShowBulkImportView () 418 424
void ShowSaveOrPublishPlaceToRoblox (bool showGameSelect, bool isPublish, StudioCloseMode closeMode) 478 479 530
void emitPlacePublishedSignal () 396 402
BulkImportFinished (int state) 419 424
DEPRECATED_GameNameUpdated (string name) 530 535
DEPRECATED_GamePublishFinished (bool success, int64 gameId) 530 535
DEPRECATED_OnPublishPlaceToRoblox (bool isOverwritePublish) 441 470 530 535
DEPRECATED_OnSaveOrPublishPlaceToRoblox (bool showGameSelect, bool isPublish, StudioCloseMode closeMode) 530 535
FirstPublishOfCloudPlace (int64 universeId, int64 placeId) 477 505
GameNameUpdated (string name) 457 530
GamePublishFinished (bool success, int64 gameId) 402 426 530
GamePublishedToRoblox () 396 402
OnConvertToPackageResult (bool isSuccessful, string errorMessage) 401 402 520
OnOpenConvertToPackagePlugin (Objects instances, string name) 396 401 520
OnPublishPlaceToRoblox (bool isOverwritePublish) 393 441 530
OnSaveOrPublishPlaceToRoblox (bool showGameSelect, bool isPublish, StudioCloseMode closeMode) 471 475 479 530
PlacePublishedToRoblox () 400 402

History

Members

ActiveScript On DevHub

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

Tags: [ReadOnly, NotReplicated]

AlignDraggedObjects On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, ReadOnly, NotReplicated]

AnimationIdSelected On DevHub

Name Type Default
id int64 none

History

CopyToClipboard On DevHub

Name Type Default
stringToCopy string none

History

DraggerSolveConstraints On DevHub

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

History

Tags: [ReadOnly, NotReplicated]

DrawConstraintsOnTop On DevHub

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

History

Tags: [ReadOnly, NotReplicated, Deprecated]

GetBadgeConfigureUrl On DevHub

Name Type Default
badgeId int64 none

History

GetBadgeUploadUrl On DevHub

Name Type Default
No parameters.

History

GetClassIcon On DevHub

Gets the explorer icon for a given class.

Name Type Default
className string none

GetClassIcon returns the icon for a class as displayed in Studio's explorer panel. className is the name of an existing Roblox class. If successful, a table with the following fields is returned:

These correspond to the Image, ImageRectOffset, and ImageRectSize properties of an ImageLabel or ImageButton. The values of each fields can be set directly to its corresponding property to display the icon correctly.

If the given class does not exist, then following error is thrown:

GetClassIcon: CLASS is not a Roblox class.

Where CLASS is the value of the given className.

Examples

Generate a GUI displaying the entire game tree.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
local StudioService = game:GetService("StudioService")
local TextService = game:GetService("TextService")
local StarterGui = game:GetService("StarterGui")

-- Get base size of icon, assuming all icons have the same size.
local iconSize = StudioService:GetClassIcon("Instance").ImageRectSize
local font = Enum.Font.SourceSans
local fontSize = iconSize.Y
local labelTextOffset = 2

-- Create label template.
local labelTemplate = Instance.new("Frame")
labelTemplate.Name = "ClassLabel"
labelTemplate.BackgroundTransparency = 1

local iconTemplate = Instance.new("ImageLabel", labelTemplate)
iconTemplate.Name = "IconLabel"
iconTemplate.Size = UDim2.new(0, iconSize.X, 0, iconSize.Y)
iconTemplate.BackgroundTransparency = 1

local textTemplate = Instance.new("TextLabel", labelTemplate)
textTemplate.Name = "TextLabel"
textTemplate.Position = UDim2.new(0, iconSize.X + labelTextOffset, 0, 0)
textTemplate.TextXAlignment = Enum.TextXAlignment.Left
textTemplate.BackgroundTransparency = 1
textTemplate.TextColor3 = Color3.new(1, 1, 1)

-- Generate labels.
local maxWidth = 0
local labels = {}
local function createLabels(objects, depth)
	for i, object in pairs(objects) do
		-- Some objects are not friendly to being indexed.
		local ok, name = pcall(function() return object.Name end)
		if ok and object.ClassName ~= "" then
			local icon = StudioService:GetClassIcon(object.ClassName)
			local textSize = TextService:GetTextSize(name, fontSize, font, Vector2.new(0, 0))
			local label = labelTemplate:Clone()
			label.Position = UDim2.new(0, depth * iconSize.X, 0, #labels * iconSize.Y)
			label.Size = UDim2.new(0, iconSize.X + textSize.X + labelTextOffset, 0, iconSize.Y)
			label.IconLabel.Image = icon.Image
			label.IconLabel.ImageRectOffset = icon.ImageRectOffset
			label.IconLabel.ImageRectSize = icon.ImageRectSize
			label.TextLabel.Text = name
			label.TextLabel.Size = UDim2.new(0, textSize.X, 0, iconSize.Y)
			local width = label.Position.X.Offset + label.Size.X.Offset
			if width > maxWidth then
				maxWidth = width
			end
			labels[#labels + 1] = label
			createLabels(object:GetChildren(), depth + 1)
		end
	end
end
createLabels(game:GetChildren(), 0)

-- Generate GUI.
local screen = Instance.new("ScreenGui")
local container = Instance.new("ScrollingFrame", screen)
local width = maxWidth + container.ScrollBarThickness
container.Position = UDim2.new(0, 10, 0, 10)
container.Size = UDim2.new(0, width, 1, -20)
container.CanvasSize = UDim2.new(0, width, 0, #labels * iconSize.Y)
container.BackgroundColor3 = Color3.new(0, 0, 0)
container.BackgroundTransparency = 0.3
container.BorderSizePixel = 0
for _, label in pairs(labels) do
	label.Parent = container
end
screen.Parent = game.StarterGui

History

GetPlaceIsPersistedToCloud On DevHub

Name Type Default
No parameters.

History

GetResourceByCategory On DevHub

Name Type Default
category string none

History

GetStartupAssetId On DevHub

Name Type Default
No parameters.

History

GetStartupPluginId On DevHub

Name Type Default
No parameters.

History

GetTermsOfUseUrl On DevHub

Name Type Default
No parameters.

History

GetUserId On DevHub

Name Type Default
No parameters.

History

GizmoRaycast On DevHub

Name Type Default
origin Vector3 none
direction Vector3 none
raycastParams RaycastParams RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}

History

GridSize On DevHub

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

History

Tags: [ReadOnly, NotReplicated]

HasInternalPermission On DevHub

Name Type Default
No parameters.

History

HoverInstance On DevHub

This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, NotReplicated]

InstalledPluginData On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, ReadOnly, NotReplicated]

IsPluginInstalled On DevHub

Name Type Default
assetId int64 none

History

IsPluginUpToDate On DevHub

Name Type Default
assetId int64 none
currentAssetVersion int64 none

History

OnImportFromRoblox On DevHub

Name Type Default
No parameters.

History

OnOpenGameSettings On DevHub

Name Type Default
pageIdentifier string none

History

OnOpenManagePackagePlugin On DevHub

Name Type Default
userId int64 none
assetId int64 none

History

OnPluginInstalledFromToolbox On DevHub

Name Type Default
No parameters.

History

OnPluginInstalledFromWeb On DevHub

Name Type Default
pluginId string none

History

OnPublishAsPlugin On DevHub

Name Type Default
instances Objects none

History

OnSaveToRoblox On DevHub

Name Type Default
instances Objects none

History

OpenInBrowser_DONOTUSE On DevHub

Name Type Default
url string none

History

PivotSnapToGeometry On DevHub

This property is read-only. Its value can be read, but it cannot be modified.
This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, ReadOnly, NotReplicated]

PromptImportFile On DevHub

This function yields. It will block the calling thread until completion.
Name Type Default
fileTypeFilter Array {}

History

Tags: [Yields]

PromptImportFiles On DevHub

This function yields. It will block the calling thread until completion.
Name Type Default
fileTypeFilter Array {}

History

Tags: [Yields]

PromptTransformPluginCheckEnable On DevHub

Name Type Default
No parameters.

History

RequestClose On DevHub

Name Type Default
closeMode StudioCloseMode none

History

RotateIncrement On DevHub

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

History

Tags: [ReadOnly, NotReplicated]

SaveLocallyAsComplete On DevHub

Name Type Default
success bool none

History

SetPluginEnabled On DevHub

Name Type Default
assetId int64 none
state bool none

History

ShowConstraintDetails On DevHub

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

History

Tags: [ReadOnly, NotReplicated]

ShowPlaceVersionHistoryDialog On DevHub

Name Type Default
placeId int64 none

History

ShowPublishToRoblox On DevHub

Name Type Default
No parameters.

History

StudioLocaleId On DevHub

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

History

Tags: [ReadOnly, NotReplicated]

TryInstallPlugin On DevHub

This function yields. It will block the calling thread until completion.
Name Type Default
assetId int64 none
assetVersionId int64 none

History

Tags: [Yields]

UninstallPlugin On DevHub

Name Type Default
assetId int64 none

History

UpdatePluginManagement On DevHub

Name Type Default
No parameters.

History

UseLocalSpace On DevHub

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

History

Tags: [NotReplicated]

Removed members

BaseURLHasChineseHost

Name Type Default
No parameters.

History

BulkImportFinished

Name Type Default
state int none

History

ConvertToPackageUpload

Name Type Default
uploadUrl string none

History

DEPRECATED_EmitPlacePublishedSignal

Name Type Default
No parameters.

History

DEPRECATED_GameNameUpdated

Name Type Default
name string none

History

DEPRECATED_GamePublishFinished

Name Type Default
success bool none
gameId int64 none

History

DEPRECATED_OnPublishPlaceToRoblox

Name Type Default
isOverwritePublish bool none

History

DEPRECATED_OnSaveOrPublishPlaceToRoblox

Name Type Default
showGameSelect bool none
isPublish bool none
closeMode StudioCloseMode none

History

DEPRECATED_RefreshDocumentDisplayName

Name Type Default
No parameters.

History

DEPRECATED_SetDocumentDisplayName

Name Type Default
newName string none

History

DEPRECATED_SetTurnOnTeamCreateOnPublish

Name Type Default
turnOn bool none

History

DEPRECATED_SetUniverseDisplayName

Name Type Default
newName string none

History

DEPRECATED_ShowActiveInstanceHighlight

This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, NotReplicated]

DEPRECATED_ShowPlaceVersionHistoryDialog

Name Type Default
No parameters.

History

DEPRECATED_ShowSaveOrPublishPlaceToRoblox

Name Type Default
showGameSelect bool none
isPublish bool none
closeMode StudioCloseMode none

History

DEPRECATED_publishAs

Name Type Default
universeId int64 none
placeId int64 none
groupId int64 none

History

EmitPlacePublishedSignal

Name Type Default
No parameters.

History

FirstPublishOfCloudPlace

Name Type Default
universeId int64 none
placeId int64 none

History

GameNameUpdated

Name Type Default
name string none

History

GamePublishFinished

Name Type Default
success bool none
gameId int64 none

History

GamePublishedToRoblox

Name Type Default
No parameters.

History

GetInstalledPluginData

This function yields. It will block the calling thread until completion.
Name Type Default
No parameters.

History

Tags: [Yields]

GetUserIsInTeamCreateToggleRamp

Name Type Default
No parameters.

History

LaunchBulkImport

Name Type Default
assetTypeToImport int none

History

OnConvertToPackageResult

Name Type Default
isSuccessful bool none
errorMessage string none

History

OnOpenConvertToPackagePlugin

Name Type Default
instances Objects none
name string none

History

OnPublishPlaceToRoblox

Name Type Default
isOverwritePublish bool none

History

OnSaveOrPublishPlaceToRoblox

Name Type Default
showGameSelect bool none
isPublish bool none
closeMode StudioCloseMode none

History

OpenPluginInsertPage

Name Type Default
assetId int64 none

History

PlacePublishedToRoblox

Name Type Default
No parameters.

History

PromptForLocalSave

Name Type Default
No parameters.

History

PromptImportLocalAsset

This function yields. It will block the calling thread until completion.
This item is deprecated. It exists for backwards-compatibility only, and should not be used for new work.
Name Type Default
prompt string none
fileTypeFilter Array {}

History

Tags: [Yields, Deprecated]

PromptImportLocalAssets

This function yields. It will block the calling thread until completion.
This item is deprecated. It exists for backwards-compatibility only, and should not be used for new work.
Name Type Default
prompt string none
fileTypeFilter Array {}

History

Tags: [Yields, Deprecated]

PublishAs

Name Type Default
universeId int64 none
placeId int64 none
groupId int64 none

History

RefreshDocumentDisplayName

Name Type Default
No parameters.

History

RequestCloseStudio

Name Type Default
No parameters.

History

SerializeInstances

Name Type Default
instances Objects none

History

SetDocumentDisplayName

Name Type Default
newName string none

History

SetTurnOnTeamCreateOnPublish

Name Type Default
turnOn bool none

History

SetUniverseDisplayName

Name Type Default
newName string none

History

ShowActiveInstanceHighlight

This member is hidden. It is not meant to be used, and may have unresolved issues.
This item is not replicated. Its interface does not cross the network boundary.

History

Tags: [Hidden, NotReplicated]

ShowBulkImportView

Name Type Default
No parameters.

History

ShowSaveOrPublishPlaceToRoblox

Name Type Default
showGameSelect bool none
isPublish bool none
closeMode StudioCloseMode none

History

emitPlacePublishedSignal

Name Type Default
No parameters.

History

Relevant classes (1)

Relevant enums (1)