Yahoo Search Busca da Web

Resultado da Busca

  1. 14 de mar. de 2022 · :Disconnect stops an event from listening for the next time it fires, specifically RBXScriptSignal. Why is this useful? Well, when u have a game with lots of events, if u don’t disconnect them after u no longer need it, it will continue to listen for it and clutter up the memory.

    • Events

      If you connect a function to an event but don't want the...

    • Disconnecting functions

      :Disconnect() is generally ran whenever a connection is not...

  2. 24 de jun. de 2020 · My main guess is that it’s to disconnect a function from an event. You have just answered your own question. That is what it does. Say for instance you have a part that kills a player. But you only want the part to kill one player. Disconnecting the Touched connection would come in handy:

  3. 10 de mar. de 2023 · By using :Disconnect(), you’re essentially telling the event listener to stop listening for the event and to disconnect itself from the event. This means that the event listener will no longer fire when the event is triggered, and you won’t end up with multiple listeners that are all firing at the same time.