22 min read

Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.

Plugin

Inherits from: Instance → Object

Plugin is the main object responsible for creating custom Studio widgets, plugin toolbars, plugin buttons, and more. The Plugin object can be accessed through the RobloxGlobals.plugin global reference in a Script that is executed as a plugin.

Inherits from: Instance

Memory category: Instances

Tags: NotCreatable

Code samples: View on Creator Hub (Plugin-Global-Pass, Plugin-Global-Receive).

Properties

NameType / ReturnsDescription
Plugin.CollisionEnabledbooleanReturns whether the user has enabled Collisions in Studio's toolbar.
Plugin.DisableUIDragDetectorDragsbooleanIf true, toolbars and buttons for the plugin will ignore dragging related to a UIDragDetector instance.
Plugin.GridSizefloatReturns the grid snapping size the user has set in Studio.
Plugin.IsDebuggablebooleanIndicates whether the plugin's scripts can be debugged in Studio.

Inherited from Instance

NameType / ReturnsDescription
Instance.ArchivablebooleanDetermines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published.
Instance.archivableboolean
Instance.CapabilitiesSecurityCapabilitiesThe set of capabilities allowed to be used for scripts inside this container.
Instance.IsInSandboxbooleanIndicates whether the instance is inside a sandboxed container.
Instance.NamestringA non-unique identifier of the Instance.
Instance.ParentInstanceDetermines the hierarchical parent of the Instance.
Instance.PredictionModePredictionModeReflects the client-side prediction mode applied to the instance under server-authoritative physics.
Instance.RobloxLockedbooleanA deprecated property that used to protect CoreGui objects.
Instance.SandboxedbooleanWhen enabled, the instance can only access abilities in its Capabilities list.
Instance.UniqueIdUniqueIdA unique identifier for the instance.

Inherited from Object

NameType / ReturnsDescription
Object.ClassNamestringA read-only string representing the class this Object belongs to.
Object.classNamestring

Plugin.CollisionEnabled

Returns whether the user has enabled Collisions in Studio's toolbar.

FieldValue
typeboolean
tags["ReadOnly","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}

Plugin.DisableUIDragDetectorDrags

If true, toolbars and buttons for the plugin will ignore dragging related to a UIDragDetector instance.

FieldValue
typeboolean
security{"read":"RobloxScriptSecurity","write":"RobloxScriptSecurity"}
thread safetyReadSafe
categoryData
serialization{"can_load":true,"can_save":true}

Plugin.GridSize

Returns the grid snapping size the user has set in Studio's toolbar. Note that this property may have slight rounding errors; for example it may be 0.0099999997764826 for a user setting of 0.01, or 0.4000000059604645 for a user setting of 0.4.

FieldValue
typefloat
tags["ReadOnly","NotReplicated"]
security{"read":"None","write":"None"}
thread safetyReadSafe
categoryData
serialization{"can_load":false,"can_save":false}

Plugin.IsDebuggable

Indicates whether the plugin's scripts can be debugged in Studio. This property is not accessible through scripts.

FieldValue
typeboolean
security{"read":"RobloxScriptSecurity","write":"RobloxScriptSecurity"}
thread safetyReadSafe
categoryData
serialization{"can_load":true,"can_save":true}

Methods

NameType / ReturnsDescription
Plugin:Activate()Sets the state of the calling plugin to activated.
Plugin:CreateDockWidgetPluginGuiDockWidgetPluginGuiCreates a DockWidgetPluginGui given a DockWidgetPluginGuiInfo.
Plugin:CreateDockWidgetPluginGuiAsyncDockWidgetPluginGuiCreates a DockWidgetPluginGui given a DockWidgetPluginGuiInfo.
Plugin:CreatePluginActionPluginActionCreates a PluginAction which represents a generic performable action in Studio with no directly‑associated PluginToolbarButton.
Plugin:CreatePluginMenuPluginMenuCreates a new plugin menu.
Plugin:CreateToolbarPluginToolbarCreates a new PluginToolbar with the given name.
Plugin:Deactivate()Deactivates the plugin.
Plugin:GetJoinModeJointCreationModeReturns the JointCreationMode the user has set in Studio's toolbar.
Plugin:GetMousePluginMouseReturns a Mouse that can be used while the plugin is active.
Plugin:GetSelectedRibbonToolRibbonToolReturns the currently selected RibbonTool.
Plugin:GetSettingVariantRetrieves a previously stored value with the given key, or nil if the given key doesn't exist.
Plugin:GetStudioUserIdint64Returns the Studio user's userId if they're logged in, otherwise returns 0.
Plugin:ImportFbxAnimationInstancePrompts the user to open a .fbx animation file that can be loaded onto the rigModel, then proceeds to insert the animation as a KeyframeSequence in the Workspace.
Plugin:ImportFbxAnimationAsyncInstancePrompts the user to open a .fbx animation file that can be loaded onto the rigModel, then proceeds to insert the animation as a KeyframeSequence in the Workspace.
Plugin:ImportFbxRigInstancePrompts the user to open a .fbx file, uploads the individual components of the model as meshes, and generates a character rig for use in animation, which is loaded into the Workspace.
Plugin:ImportFbxRigAsyncInstancePrompts the user to open a .fbx file, uploads the individual components of the model as meshes, and generates a character rig for use in animation, which is loaded into the Workspace.
Plugin:IntersectInstanceIntersects the given parts and returns the resulting IntersectOperation.
Plugin:IsActivatedbooleanReturns true if this plugin is currently active, after having been activated via the Activate() function.
Plugin:IsActivatedWithExclusiveMousebooleanReturns true if this plugin is currently active with an exclusive mouse.
Plugin:NegateInstancesNegates the given parts and returns the resulting NegateOperations.
Plugin:OpenScript()Used to open the given script instance in an editor window, in Roblox studio, at the given line. If no line is given as an argument it will default to 1.
Plugin:OpenWikiPage()Opens the context help window to the wiki page that url links to.
Plugin:PromptForExistingAssetIdint64Opens a window in Roblox Studio that prompts the user to select an existing AssetType.Animation asset. The assetType parameter must be Animation; other values are not supported and cause an error.
Plugin:PromptForExistingAssetIdAsyncint64Opens a window in Roblox Studio that prompts the user to select an existing AssetType.Animation asset. The assetType parameter must be Animation; other values are not supported and cause an error.
Plugin:PromptSaveSelectionbooleanPrompts the user to save their current selection with the specified file name.
Plugin:PromptSaveSelectionAsyncbooleanPrompts the user to save their current selection with the specified file name.
Plugin:SaveSelectedToRoblox()Opens an upload window for the user's current selection.
Plugin:SelectRibbonTool()Activates the specified Roblox Studio tool.
Plugin:SeparateInstancesSeparates the given UnionOperations and returns the resulting parts.
Plugin:SetSetting()Stores a given value for later use under the given key. The value will persist even after Studio is closed.
Plugin:StartDrag()Starts a drag action given a dictionary of parameters.
Plugin:UnionInstanceUnions the given parts and returns the resulting UnionOperation.

Inherited from Instance

NameType / ReturnsDescription
Instance:AddTag()Applies a tag to the instance.
Instance:childrenInstancesReturns an array of the object's children.
Instance:ClearAllChildren()This method destroys all of an instance's children.
Instance:CloneInstanceCreate a copy of an instance and all its descendants, ignoring instances that are not Archivable.
Instance:cloneInstance
Instance:Destroy()Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children.
Instance:destroy()
Instance:FindFirstAncestorInstance?Returns the first ancestor of the Instance whose Instance.Name is equal to the given name.
Instance:FindFirstAncestorOfClassInstance?Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className.
Instance:FindFirstAncestorWhichIsAInstance?Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstChildInstance?Returns the first child of the Instance found with the given name.
Instance:findFirstChildInstance
Instance:FindFirstChildOfClassInstance?Returns the first child of the Instance whose ClassName is equal to the given class name.
Instance:FindFirstChildWhichIsAInstance?Returns the first child of the Instance for whom Object:IsA() returns true for the given className.
Instance:FindFirstDescendantInstance?Returns the first descendant found with the given Instance.Name.
Instance:GetActorActor?Returns the Actor associated with the Instance, if any.
Instance:GetAttributeVariantReturns the value which has been assigned to the given attribute name.
Instance:GetAttributeChangedSignalRBXScriptSignalReturns an event that fires when the given attribute changes.
Instance:GetAttributesDictionaryReturns a dictionary of the instance's attributes.
Instance:GetChildrenInstancesReturns an array containing all of the instance's children.
Instance:getChildrenInstances
Instance:GetDebugIdstringReturns a coded string of the debug ID used internally by Roblox.
Instance:GetDescendantsInstancesReturns an array containing all of the descendants of the instance.
Instance:GetFullNamestringReturns a string describing the instance's ancestry.
Instance:GetStyledVariantReturns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified.
Instance:GetStyledPropertyChangedSignalRBXScriptSignalReturns an event that fires when the given style property changes on the instance.
Instance:GetTagsArrayGets an array of all tags applied to the instance.
Instance:HasTagbooleanCheck whether the instance has a given tag.
Instance:IsAncestorOfbooleanReturns true if an Instance is an ancestor of the given descendant.
Instance:IsDescendantOfbooleanReturns true if an Instance is a descendant of the given ancestor.
Instance:isDescendantOfboolean
Instance:IsPropertyModifiedbooleanReturns true if the value stored in the specified property is not equal to the code-instantiated default.
Instance:QueryDescendantsInstancesReturns an array containing all descendants of the instance that match the selector string.
Instance:Remove()Sets the object's Parent to nil, and does the same for all its descendants.
Instance:remove()
Instance:RemoveTag()Removes a tag from the instance.
Instance:ResetPropertyToDefault()Resets a property to its default value.
Instance:SetAttribute()Sets the attribute with the given name to the given value.
Instance:WaitForChildInstanceReturns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does.

Inherited from Object

NameType / ReturnsDescription
Object:GetPropertyChangedSignalRBXScriptSignalGet an event that fires when a given property of the object changes.
Object:IsAbooleanReturns true if an object's class matches or inherits from a given class.
Object:isAboolean

Plugin:Activate

This method sets the state of the calling plugin to activated. Activating the plugin allows mouse control through the GetMouse() method.

At any given time, there are either 0 or 1 activated plugins. Activating a plugin will deactivate all other plugins and they will receive a Deactivation event.

See Also

Parameters

NameTypeDefaultDescription
exclusiveMousebooleanA boolean specifying whether to activate the plugin with exclusive mouse. If true, a PluginMouse can be retrieved via GetMouse().

Returns

TypeDescription
()
FieldValue
securityPluginSecurity
thread safetyUnsafe

Plugin:CreateDockWidgetPluginGui

Deprecated. This method has been superseded by CreateDockWidgetPluginGuiAsync().

This method has been superseded by CreateDockWidgetPluginGuiAsync(). It creates a new DockWidgetPluginGui from the given DockWidgetPluginGuiInfo.

Parameters

NameTypeDefaultDescription
pluginGuiIdstringA unique and consistent identifier used to storing the widget's dock state and other internal details.
dockWidgetPluginGuiInfoDockWidgetPluginGuiInfoDescribes the DockWidgetPluginGui to create (initial state, size, etc).

Returns

TypeDescription
DockWidgetPluginGui
FieldValue
tags["Yields","Deprecated"]
securityPluginSecurity
thread safetyUnsafe

Plugin:CreateDockWidgetPluginGuiAsync

This method creates a new DockWidgetPluginGui from the given DockWidgetPluginGuiInfo. The first parameter, pluginGuiId, should be a unique and consistent string. It is used to save the state of the widget's dock state and other internal details.

Parameters

NameTypeDefaultDescription
pluginGuiIdstringA unique and consistent identifier used to storing the widget's dock state and other internal details.
dockWidgetPluginGuiInfoDockWidgetPluginGuiInfoDescribes the DockWidgetPluginGui to create (initial state, size, etc).

Returns

TypeDescription
DockWidgetPluginGui
FieldValue
tags["Yields"]
securityPluginSecurity
thread safetyUnsafe

Code samples: View on Creator Hub (DockWidgetPluginGui-Hello-World-Example).

Plugin:CreatePluginAction

This method creates a PluginAction which represents a generic performable action in Studio with no directly‑associated PluginToolbarButton.

See also CreatePluginMenu() which creates a Studio PluginMenu that can display a list of PluginActions.

Parameters

NameTypeDefaultDescription
actionIdstringMust be a unique string that identifies this PluginAction from others.
textstringThe displayed name of the action.
statusTipstringThe displayed description of the action.
iconNamestringThe name of the icon used to display the plugin.
allowBindingbooleantrueWhether the PluginAction will be hidden from Studio's shortcuts view. Useful for contextual actions. Defaults to true.

Returns

TypeDescription
PluginAction
FieldValue
securityPluginSecurity
thread safetyUnsafe

Code samples: View on Creator Hub (creating-a-pluginaction).

Plugin:CreatePluginMenu

This function creates a new PluginMenu which is a context menu that can be shown in Studio that displays a list of PluginActions and also supports submenus.

Parameters

NameTypeDefaultDescription
idstringUnique ID for the menu.
titlestringThe text to be displayed when used as a submenu.
iconstringThe icon to be displayed when used as a submenu.

Returns

TypeDescription
PluginMenu
FieldValue
securityPluginSecurity
thread safetyUnsafe

Code samples: View on Creator Hub (creating-a-pluginaction-and-pluginmenu).

Plugin:CreateToolbar

This method creates a new PluginToolbar with the given name. The toolbar can then be used to create plugin buttons.

Parameters

NameTypeDefaultDescription
namestringThe visible text on the toolbar, labeling the group of buttons contained within.

Returns

TypeDescription
PluginToolbar
FieldValue
securityPluginSecurity
thread safetyUnsafe

Code samples: View on Creator Hub (Plugin-CreateToolbar1).

Plugin:Deactivate

Deactivates the plugin. This will disengage the associated PluginMouse if it has been activated.

See Also

Returns

TypeDescription
()
FieldValue
securityPluginSecurity
thread safetyUnsafe

Plugin:GetJoinMode

Returns the JointCreationMode the user has set in Studio's toolbar.

Returns

TypeDescription
JointCreationMode
FieldValue
securityPluginSecurity
thread safetyUnsafe

Plugin:GetMouse

This method returns a PluginMouse that can be used while the plugin is active through Activate().

Returns

TypeDescription
PluginMouse
FieldValue
securityPluginSecurity
thread safetyUnsafe

Code samples: View on Creator Hub (Plugin-GetMouse1).

Plugin:GetSelectedRibbonTool

This method returns the currently selected RibbonTool.

Returns

TypeDescription
RibbonTool
FieldValue
securityPluginSecurity
thread safetyUnsafe

Code samples: View on Creator Hub (Plugin-GetSelectedRibbonTool1).

Plugin:GetSetting

Retrieves a previously stored value with the given key, or nil if the given key doesn't exist.

Because multiple instances of the same plugin can run simultaneously (for example, if multiple Studio windows are open), you shouldn't depend on this value staying the same over time. The other plugin instances can update the setting at any time.

This call can silently fail and return nil if multiple instances of the same plugin are actively reading and writing data. If your plugin expects to write to settings frequently, you should double-check the returned value from this call after a short while to distinguish between a setting being temporarily unavailable and a setting not existing.

Parameters

NameTypeDefaultDescription
keystringThe string key that was previously passed to SetSetting().

Returns

TypeDescription
Variant
FieldValue
securityPluginSecurity
thread safetyUnsafe

Code samples: View on Creator Hub (Plugin-GetSetting1).

Plugin:GetStudioUserId

Deprecated.

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

Returns

TypeDescription
int64
FieldValue
tags["Deprecated"]
securityPluginSecurity
thread safetyUnsafe

Plugin:ImportFbxAnimation

Deprecated.

This method prompts the user to open a .fbx animation file that can be loaded onto the rigModel, then proceeds to insert the animation as a KeyframeSequence named "ImportedAnimation" in the Workspace. The isR15 parameter determines whether the file is interpreted as an R15 rig and defaults to true.

Returns the resulting KeyframeSequence instance. Errors if rigModel is nil or if the user cancels the file dialog without selecting a file.

Parameters

NameTypeDefaultDescription
rigModelInstanceThe rig model that the imported animation will be applied to.
isR15booleantrueWhether the animation file should be interpreted as an R15 rig. Defaults to true.

Returns

TypeDescription
Instance
FieldValue
tags["Yields","Deprecated"]
securityPluginSecurity
thread safetyUnsafe

Plugin:ImportFbxAnimationAsync

This function prompts the user to open a .fbx animation file that can be loaded onto the rigModel, then proceeds to insert the animation as a KeyframeSequence in the Workspace.

Parameters

NameTypeDefaultDescription
rigModelInstanceThe rig model that the imported animation will be applied to.
isR15booleantrueWhether the animation file should be interpreted as an R15 rig. Defaults to true.

Returns

TypeDescription
Instance
FieldValue
tags["Yields"]
securityPluginSecurity
thread safetyUnsafe

Plugin:ImportFbxRig

Deprecated. This method has been superseded by ImportFbxRigAsync().

This method has been superseded by ImportFbxRigAsync(). It prompts the user to open a .fbx file, uploads the individual components of the model as meshes, and generates a character rig for use in animation, which is loaded into the Workspace.

Parameters

NameTypeDefaultDescription
isR15booleantrueWhether the rig file should be interpreted as R15. Defaults to true.

Returns

TypeDescription
Instance
FieldValue
tags["Yields","Deprecated"]
securityPluginSecurity
thread safetyUnsafe

Plugin:ImportFbxRigAsync

Prompts the user to open a .fbx file, uploads the individual components of the model as meshes, and generates a character rig for use in animation, which is loaded into the Workspace.

Parameters

NameTypeDefaultDescription
isR15booleantrueWhether the rig file should be interpreted as R15. Defaults to true.

Returns

TypeDescription
Instance
FieldValue
tags["Yields"]
securityPluginSecurity
thread safetyUnsafe

Plugin:Intersect

Intersects the given parts and returns the resulting IntersectOperation.

Parameters

NameTypeDefaultDescription
objectsInstancesThe array of BaseParts to intersect.

Returns

TypeDescription
Instance
FieldValue
securityPluginSecurity
thread safetyUnsafe

Plugin:IsActivated

This function returns true if this plugin is currently active, after having been activated via the Activate() function.

Returns

TypeDescription
booleanA boolean indicating whether the plugin is currently active.
FieldValue
securityPluginSecurity
thread safetyUnsafe

Plugin:IsActivatedWithExclusiveMouse

This function returns true if this plugin is currently active with an exclusive mouse, after having been activated via the Activate() function. If this returns true, a PluginMouse can be retrieved via GetMouse().

See Also

Returns

TypeDescription
booleanWhether this plugin is currently active with an exclusive mouse.
FieldValue
securityPluginSecurity
thread safetyUnsafe

Plugin:Negate

Negates the given parts and returns the resulting NegateOperations.

Parameters

NameTypeDefaultDescription
objectsInstancesThe array of BaseParts to negate.

Returns

TypeDescription
Instances
FieldValue
securityPluginSecurity
thread safetyUnsafe

Plugin:OpenScript

Deprecated.

Used to open the given script instance in an editor window, in Roblox studio, at the given line. If no line is given as an argument it will default to 1.

Prefer ScriptEditorService:OpenScriptDocumentAsync(), which provides better integration with other script editor APIs and is more extensible.

Parameters

NameTypeDefaultDescription
scriptLuaSourceContainerThe LuaSourceContainer script instance to open.
lineNumberint1The line number to navigate to in the editor. Defaults to 1.

Returns

TypeDescription
()
FieldValue
tags["Deprecated"]
securityPluginSecurity
thread safetyUnsafe

Code samples: View on Creator Hub (Plugin-OpenScript1).

Plugin:OpenWikiPage

Opens the context help window to the wiki page that url links to.

Parameters

NameTypeDefaultDescription
urlstringThe URL of the wiki/documentation page to open.

Returns

TypeDescription
()
FieldValue
securityPluginSecurity
thread safetyUnsafe

Code samples: View on Creator Hub (Plugin-OpenWikiPage1).

Plugin:PromptForExistingAssetId

Opens a window in Roblox Studio that prompts the user to select an existing animation asset from the user's inventory. Pass Animation as the assetType argument.

Returns the selected animation asset ID as an int64, or -1 if the user closes the dialog without selecting an asset. If assetType is not Animation, this method errors.

Parameters

NameTypeDefaultDescription
assetTypestringThe asset type to browse. Only Animation is supported.

Returns

TypeDescription
int64
FieldValue
tags["Yields"]
securityPluginSecurity
thread safetyUnsafe

Plugin:PromptForExistingAssetIdAsync

Opens a window in Roblox Studio that prompts the user to select an existing animation asset from the user's inventory. Pass Animation as the assetType argument.

Returns the selected animation asset ID as an int64, or -1 if the user closes the dialog without selecting an asset. If assetType is not Animation, this method errors.

Parameters

NameTypeDefaultDescription
assetTypestringThe asset type to browse. Only Animation is supported.

Returns

TypeDescription
int64
FieldValue
tags["Yields"]
securityPluginSecurity
thread safetyUnsafe

Plugin:PromptSaveSelection

Deprecated. This method has been superseded by PromptSaveSelectionAsync().

This method has been superseded by PromptSaveSelectionAsync(). It prompts the user to save their current selection with the specified file name and returns whether the user completed the save.

Parameters

NameTypeDefaultDescription
suggestedFileNamestringThe default file name shown in the save dialog. Defaults to an empty string.

Returns

TypeDescription
boolean
FieldValue
tags["Yields","Deprecated"]
securityPluginSecurity
thread safetyUnsafe

Plugin:PromptSaveSelectionAsync

Prompts the user to save their current selection with the specified file name. Returns true if the user did save the file.

Parameters

NameTypeDefaultDescription
suggestedFileNamestringThe default file name shown in the save dialog. Defaults to an empty string.

Returns

TypeDescription
boolean
FieldValue
tags["Yields"]
securityPluginSecurity
thread safetyUnsafe

Plugin:SaveSelectedToRoblox

Opens an upload window for the user's current selection.

Returns

TypeDescription
()
FieldValue
securityPluginSecurity
thread safetyUnsafe

Plugin:SelectRibbonTool

Activates the specified Roblox Studio tool. If the tool opens a window, the position parameter specifies where it should be shown on the screen.

An object must be selected in order for this to work correctly. Also note that altering the scale fields of the position property will not affect the dialog popups.

Parameters

NameTypeDefaultDescription
toolRibbonToolThe RibbonTool to activate.
positionUDim2The UDim2 screen position at which to show the tool's dialog window, if applicable.

Returns

TypeDescription
()
FieldValue
securityPluginSecurity
thread safetyUnsafe

Plugin:Separate

Separates the given UnionOperations and returns the resulting parts.

Parameters

NameTypeDefaultDescription
objectsInstancesThe array of UnionOperations to separate.

Returns

TypeDescription
Instances
FieldValue
securityPluginSecurity
thread safetyUnsafe

Plugin:SetSetting

Stores a given value for later use under the given key. The value will persist even after Roblox Studio is closed. These settings are saved in .json format as a map with string keys. Arrays are automatically converted to maps by converting the numeric keys to strings first.

Note that the .json format imposes additional restrictions, including the following characters which can corrupt the settings file:

This call can silently fail if multiple instances of the same plugin are actively reading and writing data. If your plugin expects to write to settings frequently, you may check that the data has been properly written by calling GetSetting().

Parameters

NameTypeDefaultDescription
keystringThe string key to store the value under.
valueVariantThe value to store. Must be JSON-serializable (string, number, boolean, table, or nil).

Returns

TypeDescription
()
FieldValue
securityPluginSecurity
thread safetyUnsafe

Code samples: View on Creator Hub (Plugin-SetSetting1).

Plugin:StartDrag

This method initiates a drag action using a dictionary of parameters. The parameters are as follows:

Name Type Default Description
Sender string "" Identifies the source of the drag action to the drop target
MimeType string "" The MIME type of Data.
Data string "" Information about the drag action, for example what is being dragged. Should be used by the drop target.
MouseIcon Datatype.Content "" The icon to use for the mouse cursor during the drag. If empty, uses the default cursor.
DragIcon Datatype.Content "" An image to render under the mouse cursor during the drag. This should represent the item being dragged.
HotSpot Datatype.Vector2 Datatype.Vector2.new(0, 0) The pixel offset from the top-left where the cursor should "hold" the DragIcon.

See also PluginGui.PluginDragEntered, PluginGui.PluginDragMoved, PluginGui.PluginDragDropped, and PluginGui.PluginDragLeft.

Parameters

NameTypeDefaultDescription
dragDataDictionaryA dictionary describing the drag, including fields such as Sender, MimeType, Data, MouseIcon, DragIcon, and HotSpot.

Returns

TypeDescription
()
FieldValue
securityPluginSecurity
thread safetyUnsafe

Code samples: View on Creator Hub (plugin-drag-and-drop).

Plugin:Union

Unions the given parts and returns the resulting UnionOperation.

Parameters

NameTypeDefaultDescription
objectsInstancesThe array of BaseParts to union together.

Returns

TypeDescription
Instance
FieldValue
securityPluginSecurity
thread safetyUnsafe

Events

NameType / ReturnsDescription
Plugin.DeactivationFired when the plugin is deactivated.
Plugin.UnloadingFires immediately before the Plugin stops running.

Inherited from Instance

NameType / ReturnsDescription
Instance.AncestryChangedFires when the Instance.Parent property of this object or one of its ancestors is changed.
Instance.AttributeChangedFires whenever an attribute is changed on the Instance.
Instance.ChildAddedFires after an object is parented to this Instance.
Instance.childAdded
Instance.ChildRemovedFires after a child is removed from this Instance.
Instance.DescendantAddedFires after a descendant is added to the Instance.
Instance.DescendantRemovingFires immediately before a descendant of the Instance is removed.
Instance.DestroyingFires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy().
Instance.StyledPropertiesChangedFires whenever any style property is changed on the instance, including when a property is set to nil.

Inherited from Object

NameType / ReturnsDescription
Object.ChangedFires immediately after a property of the object changes, with some limitations.

Plugin.Deactivation

Fired when the Plugin is deactivated. This occurs when either the plugin code calls Deactivate(), or because some other plugin called Activate(), which forces all other plugins to lose their active state.

See also Unloading which fires immediately before the plugin is unloaded or reloaded via uninstallation, deactivation, or updating.

FieldValue
securityPluginSecurity

Plugin.Unloading

This event fires immediately before the Plugin stops running. Plugins are unloaded when disabled, uninstalled, about to be updated, or when the place is closing.

It enables a plugin to clean up after itself before its scripts stop running, e.g. to remove unnecessary instances from the DataModel. If a plugin does not clean up properly, the old copies will remain. When this occurs, users may be forced to close and reopen the place which is a bad user experience.

Plugin-related instances such as PluginToolbarButtons, DockWidgetPluginGuis, and PluginGuis are automatically cleaned up when the plugin is unloaded so there is no need to remove them.

FieldValue
securityPluginSecurity