new_connection

If a connection with the name already exists it will disconnect it

Creates a new connections

modules.new_connection(name: string, connection: RBXScriptConnection)

Parameters

  • name: Name of the connection

  • connection: The connection itself


Example

local RunService = game:GetService("RunService")
modules.new_connection("test_connection",RunService.Heartbeat:Connect(function()
    print("Hello world")
end))

Last updated