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

# Signal.new

> Creates a new RealSignal object. The returned signal exposes Connect, Once, Wait, and Fire methods.

<div className="real-function-page">
  ```lua theme={null}
  Signal.new(): RealSignal
  ```

  ## Retornos

  <ResponseField name={"signal"} type={"RealSignal"}>
    New signal object with its own connection and waiter lists.
  </ResponseField>

  ## Tipos

  ### RealSignal

  Signal object returned by Signal.new.

  | Name      | Type                                                 | Required | Descrição                                                                  |
  | --------- | ---------------------------------------------------- | -------- | -------------------------------------------------------------------------- |
  | `Connect` | `(callback: (...any) -> ()) -> RealSignalConnection` | Yes      | Adds a callback that runs when Fire is called.                             |
  | `Once`    | `(callback: (...any) -> ()) -> RealSignalConnection` | Yes      | Adds a callback that is disconnected before its first callback invocation. |
  | `Wait`    | `() -> ...any`                                       | Yes      | Yields until Fire resumes the waiter with the fired values.                |
  | `Fire`    | `(...values: any) -> ()`                             | Yes      | Runs connected callbacks and resumes waiters with the provided values.     |

  ## Exemplo

  Create an independent RealSignal and fire it with values.

  ```lua theme={null}
  local signal = Signal.new()

  signal:Connect(function(value)
      print(value)
  end)

  signal:Fire("ready")
  ```
</div>
