> ## 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

> Tra ve array table gom RealConnection closures cho RBXScriptSignal. Argument dau tien phai la object co Luau type name la RBXScriptSignal. Function doc Connect method cua signal, ket noi temporary blank callback, doc linked list bat dau tu next reference cua ket noi tam thoi, ngat ket noi tam thoi, roi boc moi connection reference hop le. Neu khong tim thay connection reference sau ket noi tam thoi, tra ve table rong. references da duoc boc truoc do co the tra ve cung cached closure table. getsignals va get_signal_cons la aliases cho cung function.

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

  ## Alias

  * `getsignals`
  * `get_signal_cons`

  ## Đối số

  <ParamField path={"signal"} type={"RBXScriptSignal"} required>
    Signal can kiem tra. Userdata khong phai RBXScriptSignal gay type error, va signal khong co Connect field co the goi gay "Signal does not have 'Connect' method".
  </ParamField>

  ## Giá trị trả về

  <ResponseField name={"connections"} type={"{RealConnection}"}>
    Array table cua connection closure tables. Moi closure hien thi fields va methods qua methods cua no, bao gom Enabled, Disabled, LuaConnection, ForeignState, Function, Thread, Disconnect, Disable, Enable, Fire va Defer khi co san.
  </ResponseField>

  ## Ví dụ

  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>
