How to detect events' connection?

local a = workspace.Changed:Connect(function() end)
print(a, a== Enum.ConnectionState.Connected) → Connection, false

what should i do? :frowning:

RBXScriptConnections have a Connected property which determines if the connection is still alive.

local connection = workspace.Changed:Connect(function() end)
print(connection.Connected) --> true
connection:Disconnect()
print(connection.Connected) --> false
7 Likes