Any use of BindableEvents?

Is there any use of BindableEvents when considering what ModuleScripts can achieve? How do these differ, what are their strengths and weaknesses in comparison to each other, and what parts am I misunderstanding (if that is the case)?

1 Like

BindableEvents aren’t just for sending data back and forth. Triggering a function within another script can be useful. For example, if you want to communicate between two ModuleScripts, it doesn’t really make sense to have them both require each other—circular dependencies can easily lead to spaghetti code. Firing a Bindable to tell the other module to run something is much cleaner and easier to follow.

6 Likes

I think the more apt comparison / question would be about BindableFunctions, and
yes, the existence of ModuleScripts pretty much obviates the need for BindableFunctions.
BindableEvents are still useful for any custom Events that you wish to create, for instance
making your own version of a built-in Event that has some more constraints to it and / or could be
triggered by additional bits of state defined by you.

2 Likes