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

  ## Returns

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

  ## Types

  ### RealSignal

  Signal object returned by Signal.new.

  | Name | Type | Required | คำอธิบาย |
  | - | - | - | - |
  | `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. |

  ## ตัวอย่าง

  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>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.