Roblox UtilitiesDevlHub Roblox Documentation

Class

InstanceFileSyncService

NotCreatableServiceNotReplicated
Inherits
Instance › Object
Memory category
Instances

A service for interacting with file sync from a plugin.

The InstanceFileSyncService service provides an interface for plugins to interact with the file sync system (currently known as Script Sync). It allows querying the sync status of instances and retrieving instances based on file paths.

Methods 3#

GetAllInstancesReturns an array of all instances currently involved in file synchronization.PluginSecurity security
GetStatusReturns the synchronization status of a specific instance.PluginSecurity security
GetSyncedInstanceReturns the instance corresponding to a given file path.PluginSecurity security

GetAllInstances(): Instances#

PluginSecurity security

Returns an array containing every Instance that is currently being tracked or synchronized by file sync.

Returns

GetStatus(instance: Instance): InstanceFileSyncStatus#

PluginSecurity security

Returns the current InstanceFileSyncStatus of the provided Instance. This indicates whether the instance is synced as a root, as a descendant, or if it is in an error state.

NameTypeDefaultDescription
instanceInstanceThe instance to check.
Returns

GetSyncedInstance(filePath: string): Instance?#

PluginSecurity security

Returns the Instance associated with the specified absolute file path. Returns nil if the path is not mapped to any instance.

NameTypeDefaultDescription
filePathstringThe absolute path to the file.
Returns
  • Instance? — Returns the Instance being synced to the file path, if one exists. Otherwise, returns nil.

Events 1#

StatusChangedFires when the synchronization status of an instance changes.PluginSecurity security

StatusChanged(instance: Instance, status: InstanceFileSyncStatus)#

PluginSecurity security

This event fires when the InstanceFileSyncStatus of an Instance changes. It passes the affected instance and the new file sync status enum value.

NameTypeDefaultDescription
instanceInstanceThe instance whose status changed.
statusInstanceFileSyncStatusThe new synchronization status.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed