Module Contains Connections

Is It okay to create a module that contains runservice and userinput , game services events?
Like I am making a module that contains some functions like:

module:Connect("MyConnection", "Heartbeat", function()

end)

module:ConnectInput("FButtonPressed", "InputBegan", function()

end)

module:Disconnect("MyConnection")
module:Disconnect("FButtonPressed")

So it stores the connections in a table so I don’t need to create a connection table to store my connections in every single script

and how it will affect performance?

Yes, it’s fine

Technically it will increase RAM usage in the client, however the storing connections in table is like at most going to increase the usage by 1mb (unless you’re storing hundreds / thousands of connections)
I wouldn’t worry about it

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