# StudioService

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable, Not replicated, Service
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/StudioService/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/StudioService

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

## Properties

### AlignDraggedObjects

```luau
StudioService.AlignDraggedObjects: boolean
```

- Tags: Hidden, Not replicated, Roblox script security

### DraggerSolveConstraints

```luau
StudioService.DraggerSolveConstraints: boolean
```

- Tags: Read only

Reflects whether Studio's draggers solve constraints while moving objects.

### GridSize

```luau
StudioService.GridSize: number
```

- Tags: Read only

Determines the distance in studs by which Studio's drag and move tools move objects each tick.

### HoverInstance

```luau
StudioService.HoverInstance: Instance
```

- Tags: Hidden, Not replicated, Roblox script security

### InstalledPluginData

```luau
StudioService.InstalledPluginData: string
```

- Tags: Hidden, Read only, Roblox script security

### PivotSnapToGeometry

```luau
StudioService.PivotSnapToGeometry: boolean
```

- Tags: Hidden, Read only, Roblox script security

### RotateIncrement

```luau
StudioService.RotateIncrement: number
```

- Tags: Read only

Determines the degrees by which Studio's rotation tool will rotate selected objects each tick.

### Secrets

```luau
StudioService.Secrets: string
```

- Tags: Roblox script security

A JSON string storing the local secrets for the current experience, used by Studio to support HttpService:GetSecret().

### ShowConstraintDetails

```luau
StudioService.ShowConstraintDetails: boolean
```

- Tags: Read only

Reflects whether constraint details are drawn in the 3D viewport.

### ShowWeldDetails

```luau
StudioService.ShowWeldDetails: boolean
```

- Tags: Read only, Roblox script security

Reflects whether weld details are drawn in the 3D viewport.

### UseLocalSpace

```luau
StudioService.UseLocalSpace: boolean
```

- Tags: Not replicated, Load only

Determines whether Studio tools will use local space of an object or global space.

### DrawConstraintsOnTop

```luau
StudioService.DrawConstraintsOnTop: boolean
```

- Tags: Deprecated, Read only

**Deprecated:** This property is deprecated; constraints can no longer be drawn "on top" of other objects.

Deprecated property that previously controlled whether constraints were drawn on top of other objects in the viewport.

### ActiveScript

```luau
StudioService.ActiveScript: Instance
```

- Tags: Read only

Reflects the [`LuaSourceContainer`](https://rapi.sleaze.dev/classes/LuaSourceContainer.md) currently being edited (if any).

### StudioLocaleId

```luau
StudioService.StudioLocaleId: string
```

- Tags: Read only

The locale currently in-use by Studio, e.g. `en_US`.

## Methods

### AnimationIdSelected

```luau
StudioService:AnimationIdSelected(id: number)
```

- Tags: Roblox script security

### CopyToClipboard

```luau
StudioService:CopyToClipboard(stringToCopy: string)
```

- Tags: Roblox script security

### GetBadgeConfigureUrl

```luau
StudioService:GetBadgeConfigureUrl(badgeId: number): string
```

- Tags: Roblox script security

### GetBadgeUploadUrl

```luau
StudioService:GetBadgeUploadUrl(): string
```

- Tags: Roblox script security

### GetClassIcon

```luau
StudioService:GetClassIcon(className: string): { [string]: any }
```

- Tags: Plugin security

Provides a dictionary that allows the display of a class' Explorer window icon.

Parameters:

- `className`: The name of the Roblox class to retrieve the Explorer window icon for.

Returns: A dictionary containing `Image`, `ImageRectOffset`, and `ImageRectSize` fields that can be applied to an [`ImageLabel`](https://rapi.sleaze.dev/classes/ImageLabel.md) to display the class icon.

### GetResourceByCategory

```luau
StudioService:GetResourceByCategory(category: string): { [string]: any }
```

- Tags: Roblox script security

### GetStartupAssetId

```luau
StudioService:GetStartupAssetId(): string
```

- Tags: Roblox script security

### GetStartupPluginId

```luau
StudioService:GetStartupPluginId(): string
```

- Tags: Roblox script security

### GetTermsOfUseUrl

```luau
StudioService:GetTermsOfUseUrl(): string
```

- Tags: Roblox script security

### GetUserId

```luau
StudioService:GetUserId(): number
```

- Tags: Plugin security

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

Returns: The UserId of the logged-in Studio user, or 0 if the user is not logged in.

### GizmoRaycast

```luau
StudioService:GizmoRaycast(origin: Vector3, direction: Vector3, raycastParams: RaycastParams? = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): RaycastResult?
```

- Tags: Plugin security

### HasInternalPermission

```luau
StudioService:HasInternalPermission(): boolean
```

- Tags: Roblox script security

### IsPluginInstalled

```luau
StudioService:IsPluginInstalled(assetId: number): boolean
```

- Tags: Roblox script security

### IsPluginUpToDate

```luau
StudioService:IsPluginUpToDate(assetId: number, currentAssetVersion: number): boolean
```

- Tags: Roblox script security

### OpenInBrowser_DONOTUSE

```luau
StudioService:OpenInBrowser_DONOTUSE(url: string)
```

- Tags: Roblox script security

### PromptImportFileAsync

```luau
StudioService:PromptImportFileAsync(fileTypeFilter: { any }? = {}): Instance
```

- Tags: Yields, Plugin security

Prompts the current Studio user to select one file to add as a [`File`](https://rapi.sleaze.dev/classes/File.md).

Parameters:

- `fileTypeFilter`: A list of file types that the user is allowed to select. File types are formatted without a period. For example, {"jpg", "png"} would allow only a JPG or PNG file to be selected. If no filter is provided, the filter is `nil` and allows the user to select any file type.

Returns: The imported [`File`](https://rapi.sleaze.dev/classes/File.md). Returns `nil` if no files were selected, or if the selected file was too large (FileSize greater than 100 megabytes).

### PromptImportFilesAsync

```luau
StudioService:PromptImportFilesAsync(fileTypeFilter: { any }? = {}): { Instance }
```

- Tags: Yields, Plugin security

Prompts the current Studio user to select files to add as `Files`.

Parameters:

- `fileTypeFilter`: A list of file types that the user is allowed to select. File types are formatted without a period. For example, {"jpg", "png"} would allow only JPG and PNG files to be selected. If no filter is provided, the filter is `nil` and allows the user to select any file type.

Returns: The imported `Files`. Returns an empty list if no files were selected. Returns `nil` if the user selected one or more files that were too large (FileSize greater than 100 megabytes).

### SetPluginEnabled

```luau
StudioService:SetPluginEnabled(assetId: number, state: boolean)
```

- Tags: Roblox script security

### ShowPublishToRoblox

```luau
StudioService:ShowPublishToRoblox()
```

- Tags: Roblox script security

### TryInstallPlugin

```luau
StudioService:TryInstallPlugin(assetId: number, assetVersionId: number)
```

- Tags: Yields, Roblox script security

### UninstallPlugin

```luau
StudioService:UninstallPlugin(assetId: number)
```

- Tags: Roblox script security

### UpdatePluginManagement

```luau
StudioService:UpdatePluginManagement()
```

- Tags: Roblox script security

### PromptImportFile

```luau
StudioService:PromptImportFile(fileTypeFilter: { any }? = {}): Instance
```

- Tags: Deprecated, Yields, Plugin security
- Use instead: [`StudioService.PromptImportFileAsync`](https://rapi.sleaze.dev/classes/StudioService.md)

**Deprecated:**

Prompts the current Studio user to select one file to add as a [`File`](https://rapi.sleaze.dev/classes/File.md).

Parameters:

- `fileTypeFilter`: A list of file types that the user is allowed to select. File types are formatted without a period. For example, {"jpg", "png"} would allow only a JPG or PNG file to be selected. If no filter is provided, the filter is `nil` and allows the user to select any file type.

Returns: The imported [`File`](https://rapi.sleaze.dev/classes/File.md). Returns `nil` if no files were selected, or if the selected file was too large (FileSize greater than 100 megabytes).

### PromptImportFiles

```luau
StudioService:PromptImportFiles(fileTypeFilter: { any }? = {}): { Instance }
```

- Tags: Deprecated, Yields, Plugin security
- Use instead: [`StudioService.PromptImportFilesAsync`](https://rapi.sleaze.dev/classes/StudioService.md)

**Deprecated:**

Prompts the current Studio user to select files to add as `Files`.

Parameters:

- `fileTypeFilter`: A list of file types that the user is allowed to select. File types are formatted without a period. For example, {"jpg", "png"} would allow only JPG and PNG files to be selected. If no filter is provided, the filter is `nil` and allows the user to select any file type.

Returns: The imported `Files`. Returns an empty list if no files were selected. Returns `nil` if the user selected one or more files that were too large (FileSize greater than 100 megabytes).

## Events

### OnImportFromRoblox

```luau
StudioService.OnImportFromRoblox: RBXScriptSignal<(assetType: string)>
```

- Tags: Roblox script security

### OnOpenGameSettings

```luau
StudioService.OnOpenGameSettings: RBXScriptSignal<(pageIdentifier: string)>
```

- Tags: Roblox script security

### OnOpenManagePackagePlugin

```luau
StudioService.OnOpenManagePackagePlugin: RBXScriptSignal<(userId: number, assetId: number)>
```

- Tags: Roblox script security

### OnPluginInstalledFromToolbox

```luau
StudioService.OnPluginInstalledFromToolbox: RBXScriptSignal<()>
```

- Tags: Roblox script security

### OnPluginInstalledFromWeb

```luau
StudioService.OnPluginInstalledFromWeb: RBXScriptSignal<(pluginId: string)>
```

- Tags: Roblox script security

### OnPublishAsPlugin

```luau
StudioService.OnPublishAsPlugin: RBXScriptSignal<(instances: { Instance })>
```

- Tags: Roblox script security

### OnSaveToRoblox

```luau
StudioService.OnSaveToRoblox: RBXScriptSignal<(instances: { Instance })>
```

- Tags: Roblox script security

### PromptTransformPluginCheckEnable

```luau
StudioService.PromptTransformPluginCheckEnable: RBXScriptSignal<()>
```

- Tags: Roblox script security

### SaveLocallyAsComplete

```luau
StudioService.SaveLocallyAsComplete: RBXScriptSignal<(success: boolean)>
```

- Tags: Roblox script security

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
