BindableEvent
An object which enables custom events through asynchronous one-way communication between scripts on the same side of the client-server boundary. Scripts firing a BindableEvent do not yield.
Memory category | Instances |
---|
Member index 2
Description
The BindableEvent object enables custom events through asynchronous one-way communication between scripts on the same side of the client-server boundary. When you fire a BindableEvent through the BindableEvent:Fire() method, the firing script does not yield and the target function receives the passed arguments with certain limitations. BindableEvents create threads of each connected function, so even if one firing errors, others continue.
As an alternative for two-way communication between two scripts on the same side of the client-server boundary, consider BindableFunction.
As stated, BindableEvents do not allow for communication between the server and clients. If you are looking for this functionality, use a RemoteEvent as outlined in Remote Events and Callbacks.
See Custom Events and Callbacks for code samples and further details on BindableEvent.
Parameter Limitations
Any type of Roblox object such as an Enum, Instance, or others can be passed as a parameter when a BindableEvent is fired, as well as Luau types such as numbers, strings, and booleans, although you should carefully explore the limitations.
History 11
- 573 Change ReturnType of Fire from void to null
- 486 Change ThreadSafety of Fire from ReadWrite to Safe
- 483 Change ThreadSafety of Fire from Unsafe to ReadWrite
- 462 Change ThreadSafety of Event from to Unsafe
- 462 Change ThreadSafety of Fire from to Unsafe
- 79 Change Tags of BindableEvent from [preliminary] to []
- 78 Change Tags of BindableEvent from [] to [preliminary]
- 79 Change Tags of BindableEvent from [preliminary] to []
- 51 Add Event
- 51 Add Fire
- 51 Add BindableEvent
Members 2
Event
Parameters (1) | |
---|---|
arguments | Tuple |
Fires when any script calls the Fire() method on the same BindableEvent instance, using the same arguments as parameters.
See Custom Events and Callbacks for code samples and further details on Event.
Thread safety | Unsafe |
---|
Fire
Parameters (1) | ||
---|---|---|
arguments | Tuple | |
Returns (1) | ||
null |
Fires the BindableEvent which in turn fires the Event event. This method does not yield, even if no script has connected to the event, and even if a connected function yields.
Any type of Roblox object such as an Enum, Instance, or others can be passed as a parameter to Fire(), as well as Luau types such as numbers, strings, and booleans, although you should carefully explore the limitations.
See Custom Events and Callbacks for code samples and further details on Fire().
Thread safety | Safe |
---|