Skip to main content

Bindable Event Wrapper

A BindableEventWrapper is an object that wraps a BindableEvent and provides an API similar to that of normal signal libraries.

Usage

To use this, simply create a new instance by calling new. Afterwards, use the created instance like an RBXScriptSignal. Unlike an RBXScriptSignal, there is a Fire method to fire the event.

local BindableEventWrapper = require(Path.To.Module)

local foodConsumed = BindableEventWrapper.new()

foodConsumed:Connect(function(consumer: Player, kind: string)
print(consumer.Name .. " ate a " .. kind .. ".")
end)

foodConsumed:Fire(someone, "carrot")

For more information, refer to the documentation.

Why use this?

Uh..

"Your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should."

Realistically, it is oftentimes better to use an actual signal implementation, such as RbxUtil's Signal or FastSignal, especially if you want to get around the limitations imposed by traditional BindableEvents.