Skip to main content

Once

Creates a one-time signal connection that auto-disconnects after first fire and is managed by the Vault.

const part = new Instance("Part")

const connection = vault.Once(part.Touched, () => {
print("This will only print once")
})

vault.Clean() // Ensures cleanup if never fired

Parameters

ParameterTypeDescription
signalAnySignal<T>Signal to connect to
callback(...args: T) => voidFunction to call once

Returns

Connection - The created connection (auto-added to vault)

Behavior

  • Fires only once, then automatically disconnects
  • Automatically removes itself from vault after firing
  • Still tracked by vault until fired (for cleanup)