Skip to main content

Connection

A Connection is a Class used to manage the connection between a listener and a signal, it is returned when connecting to a signal, and can be used to disconnect the listener from the signal.

Functions

Disconnect

Connection:Disconnect() → ()

Disconnects a connection from a Signal, any future :Fire calls will not invoke this connection's listener.

local Connection = Signal:Connect(function(Args) end)
Connection:Disconnect()
Show raw api
{
    "functions": [
        {
            "name": "Disconnect",
            "desc": "Disconnects a connection from a Signal, any future `:Fire` calls \nwill not invoke this connection's listener.\n\n```lua \nlocal Connection = Signal:Connect(function(Args) end)\nConnection:Disconnect()\n```",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 421,
                "path": "src/NewSignal.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Connection",
    "desc": "A Connection is a Class used to manage the connection between a listener and a signal, \nit is returned when connecting to a signal, and can be used to disconnect the listener from the signal.",
    "source": {
        "line": 117,
        "path": "src/NewSignal.luau"
    }
}