Skip to main content

Await

This just waits for the callback to execute the code after it. Look at it like using Wait(), that also blocks the thread until it's done. This can be used on both the client and server.

Function

local Callbacks = WXSCore.Callbacks
Callbacks.Await(event, ...)

Parameters

NameTypeDescription
eventstringThe name of the callback.
...anyAny additional arguments to be passed to the callback.

Example

local Callbacks = WXSCore.Callbacks

local response = Callbacks.Await("TestCallback", "Some data")
print("Test callback returned with data: " .. response)