> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getconnections

> RBXScriptSignal の RealConnection closures を array table として返します。最初の argument は、Luau type name が RBXScriptSignal の object である必要があります。function は signal の Connect method を読み取り、temporary blank callback を接続し、その一時 connection の next reference から linked list を読み取り、一時 connection を切断して、有効な connection reference ごとに closure を作ります。一時 connection の後に connection reference が見つからない場合は空の table を返します。以前に closure 化された underlying references は、同じ cached closure table を返すことがあります。getsignals と get_signal_cons は同じ function の aliases です。

<div className="real-function-page">
  ```lua theme={null}
  getconnections(signal: RBXScriptSignal): {RealConnection}
  ```

  ## エイリアス

  * `getsignals`
  * `get_signal_cons`

  ## 引数

  <ParamField path={"signal"} type={"RBXScriptSignal"} required>
    調べる signal。RBXScriptSignal ではない object は type error を発生させ、呼び出し可能な Connect field がない signal は "Signal does not have 'Connect' method" を発生させます。
  </ParamField>

  ## 戻り値

  <ResponseField name={"connections"} type={"{RealConnection}"}>
    connection closure tables の array table。各 closure は methods を通じて fields と methods を公開し、利用可能な場合は Enabled, Disabled, LuaConnection, ForeignState, Function, Thread, Disconnect, Disable, Enable, Fire, Defer を含みます。
  </ResponseField>

  ## 例

  Inspect an RBXScriptSignal and list the wrapped connections Real can expose.

  ```lua theme={null}
  local Players = game:GetService("Players")

  for _, connection in ipairs(getconnections(Players.PlayerAdded)) do
      print(connection.Enabled, connection.LuaConnection)
  end
  ```
</div>
