Skip to content
Signals & connectionsOverview

Connection.Enable

Represents re-enabling of an event connection.

Details#

Re-enables a previously disabled connection. It cannot restore a subscription that has been permanently disconnected. Function/Thread metadata may be absent for some connections.

Examples#

Example

Luau
local event = Instance.new("BindableEvent")
local own = event.Event:Connect(print)
local connection = getconnection(event.Event, 1)
if connection then
    connection:Disable()
    connection:Enable()
    print(connection.Enabled)
end
task.delay(1, function() own:Disconnect(); event:Destroy() end)