Performance with multiple RBXscriptConnections

I am making a tycoon kit, and currently, when the game is run, a Touched connection is made for every buy part and and part collector part. Should I make it so the touched connection is only set up when the buy part/collector part is activated? or is the performance loss too small to make that necessary.

The performance gain you’ll receive from only connecting Touched for activated buttons is pretty marginal assuming you don’t expect characters to be in constant contact with the button and the connected functions are debounced. For all intents and purposes though, practice-wise, it’s better to only have connections on parts that are actually activated.

3 Likes