PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

Fire

Calling this method will fire the “Event” event. This function does not yield, even no script has connected to the “Event” event and even if a connected function yields. There are limitations on the values that can be sent as arguments; see the code samples

Parameters

Name Type Default Description

Returns

Return Type Summary

Code Samples


BindableEvent Valid Values

This code sample shows the kinds of values that can be sent when firing BindableEvents using Fire. Test this code by placing a Script within a BindableEvent inside the Workspace or ServerScriptService. It will raise errors on the values that cannot be fired.


BindableEvent Theading Behavior

This code sample demonstrates how BindableEvents, like all Events, create threads of each connected function. Even if one errors, like ohNo does, the others continue. In addition, this sample shows how functions connected to the event can yield without blocking the thread that fired the event.

Test this code by pasting it into a Script within a BindableEvent parented to the Workspace or ServerScriptService. When running it, you’ll notice the error by ohNo does not stop the script from continuing (“Let’s-a-go!”) or any other connected function from being called. count and alphabet both do their tasks at the same time.