The :Connect(fn)
is a method of roblox events. This method returns an RBXScriptConnection
. This can be stored as a variable like when you return values in a regular function. The RBXScriptConnection
is usually used to disconnect the event later when it’s not needed anymore through :Disconnect()
In your case the variable Connection
is used to disconnect the touched event when the bomb is touched so that it will only trigger once