How many connections are too much?

On the Developer Hub article here, it states that events should always be disconnected when no longer needed. Yesterday, I went through all the scripts in my game to see if any events were connected for longer than necessary.
However, since I am new to programming with Lua, I had trouble figuring out how I would reconnect a previously disconnected event if I needed it again, or whether some events should event be disconnected at all.
For example, I have many .Touched events that I want to fire every time the corresponding part is touched by a player. Wouldn’t disconnecting and later reconnecting each of these events require another event, defeating the purpose of the first event?

My question is, how many is too many? As in, when will the number of connections start having negative effects on the client or the server? Should I find every way to disconnect connections possible, or should I not bother about it?

The only times you need to disconnect a connection is when you know you’ll never need it again.
Take this for example


Here I get a request from the server, and I throw the button connections to a table to be disconnected after I send the request back.

2 Likes

Nope! If you know you will need it at some point again, it’s better to keep the connection.

Thank you very much! I thought it would be much more complex than that.

1 Like

Np! If ya don’t mind marking it as the solution in case anyone else runs into this thought.