How to communicate with different objects in OOP

Soo i got instance 1 _indexed as O1 that needs to check if instance 2 __indexed as O2 is true and return it, the problem there is that there are many instances under index O2 and when i used BindableFunctions it invoked only once, resulting that it invoked instance 3 indexed as O2, but didn’t invoke on instance 2
How to communicate between these when O2 instances handles 1 module script and O1 instances 1 module script as well?

We don’t usually utilize BindableFunctions. Rather, we prefer avoiding them if possible. Usually, the way to make the communication happen is via Signal objects from a module. Alternatively, you mix the paradigm with another.

Soo an object cannot communicate with another object with a callback? Ik that topics can be used, but they don’t provide a callback sadly

You can use callbacks, but callbacks are constructed within a function. They have to pass a function into the function, followed by a code logic that allows it to execute it when possible.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.