RealSignal
Signal.new
Creates a new RealSignal object. The returned signal exposes Connect, Once, Wait, and Fire methods.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Creates a new RealSignal object. The returned signal exposes Connect, Once, Wait, and Fire methods.
Signal.new(): RealSignal
| Name | Type | Required | Beschreibung |
|---|---|---|---|
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. |
local signal = Signal.new()
signal:Connect(function(value)
print(value)
end)
signal:Fire("ready")