Skip to main content

Connect

Creates a signal connection and automatically adds it to the Vault.

const part = new Instance("Part")

const connection = vault.Connect(part.Touched, () => {
print("Touched")
})

vault.Clean() // Connection is disconnected

Parameters

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

Returns

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