Skip to content

Service · inherits Instance

InstanceFileSyncService

Official docs ↗

A service for interacting with file sync from a plugin.

About InstanceFileSyncService

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

  • GetAllInstances() → InstancesPluginReturns an array of all instances currently involved in file synchronization.

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

  • GetStatus(instance: Instance) → InstanceFileSyncStatusPluginReturns the synchronization status of a specific instance.

    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.

  • GetSyncedInstance(filePath: string) → Instance?PluginReturns the instance corresponding to a given file path.

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

Events 1

  • StatusChangedInstanceFileSyncService.StatusChanged:Connect(function(instance, status))PluginFires when the synchronization status of an instance changes.

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

InstanceFileSyncService 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.