Service · inherits Instance
PluginConnectionService
This service is used by plugins to communicate with other instances of themselves running in other data models.
About PluginConnectionService
This service is used by plugins to communicate with other instances of
themselves running in other data models (e.g. a plugin in the Studio edit data
model can communicate with the instance of that same plugin in the Studio
playtest Server data model). Plugins can retrieve PluginConnection
objects from this service, which provide an API for sending messages across
the data model boundary. All access to this class is restricted to Plugin
security. The command bar is not currently supported.
Methods 2
CanHaveConnectionType
(type: PluginConnectionTargetType) → booleanPluginChecks if the current data model context can ever have connections of a given type.Checks if the current data model can potentially have connections of a given
PluginConnectionTargetType. Note that it is possible for this function to return true even if no such connections currently exist.GetPluginConnectionsOfType
(type: PluginConnectionTargetType) → List<PluginConnection>PluginReturns a list of currently connectedPluginConnectionobjects with the given connection type.Returns a list of currently connected
PluginConnectionobjects with the given connection type. EachPluginConnectionfrom this list will initially have theirConnectedproperty set to true and correspond to a connected data model related to the current data model according to theirPluginConnectionTargetType. For example, an edit data model may havePluginConnectionTargetType.Testconnections to communicate with its ongoing playtest data models, and each test data model will have anPluginConnectionTargetType.Editconnection back to its edit data model.
Events 1
Connected
PluginConnectionService.Connected:Connect(function(conn))PluginFires just after a newPluginConnectionsuccessfully connects.Fires just after a new
PluginConnectionsuccessfully connects. Plugins may listen for this signal to learn when a new data model that they can communicate with becomes available.Note: On startup, it is possible some
PluginConnectionsalready exist. Plugins should queryPluginConnectionService.GetPluginConnectionsOfTypefor each type they are interested in after connecting to this function.
PluginConnectionService also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.