Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

getconnections

The getconnections function is used to get connections that are connected to the provided Signal

function getconnections(signal: RbxScriptSignal): {[number]: ConnectionProxy}
do -- in another script
    local workspace: Workspace = workspace;
    workspace:GetPropertyChangedSignal("Gravity"):Connect(function()
        print("gravity was changed");
    end);
end;
-- our script:
for _: unknown, v: ConnectionProxy in getconnections(workspace:GetPropertyChangedSignal("Gravity")) do
    print(v.Function); --> function that is bound
    v:Fire(); --> fire this connection
    v:Disable(); --> disable this connection
    hookfunction(v.Function, function() end); --> disable the function from getting called
end;

This function is useful if you want to have control over connections.

firesignal

The firesignal will fire every connection that is bound to signal

function firesignal(signal: RbxScriptSignal, ...: any): ()
firesignal(workspace.Changed, "Name");

This function is useful if you want to fire a signal

getsignalfunctions

The getsignalfunctions will return function that is connected to Signal

function getsignalfunctions(signal: RbxScriptSignal): {[number]: (...any) -> (...any)}