Signals & connectionsOverview
Connection.Disconnect
Disconnects an event connection.
Details#
Permanently disconnects this subscription. This differs from Disable; call Connect on the original event to make a new subscription. Function/Thread metadata may be absent for some connections.
Examples#
Example
local event = Instance.new("BindableEvent")
local own = event.Event:Connect(print)
local connection = getconnection(event.Event, 1)
if connection then
connection:Disconnect()
end
task.delay(1, function() own:Disconnect(); event:Destroy() end)