Question about Signals

I’ve posted this in a discord server already, but I’m really stumped by this and want it to gain as much attention so someone can answer.

I’m watching the 5 Powerful Code Patterns talk Quenty and gang made at RDC 2020, and I’m mostly understanding the signals part except for one thing: How do other modules use each others signals? If I have two modules that I want to communicate with each other, how do I get it so one module can connect to the other’s signals?

Is there any other way aside from just passing a Signal in the return value of the module which fires it? One way I’ve thought of is creating a signalconstants module or something like that in my code, which has a sort of master list of all signals I need, and then modules can require it and connect or fire whatever signals it needs. But is that not possible or is it just bad coding practice?

The thing I think you are getting confused with is thinking that modules run code. They don’t instead like in their name they store code. The reason why you are communicate the signal when returning the signal is because the signal isnt being transmitted from the module but rather the script which you called that module.

You can do anything you like–You can create them in the module and have them be fields of the module
and/or children (as BindableEvents are objects and can be parented to the module itself for instance.)

Just to not confuse anyone, ModuleScripts do “run”, but only on their first require.

I guess you could say the same thing with functions too then

Not sure what you mean by that.

It’s fine don’t worry about it I get what u mean