Signal

Documentation of signal-related Synapse Z environment functions

getconnections

table<SynConnection> getconnections(signal: RBXScriptSignal)

returns a list of all connections to the specified signal, see SynConnection

firesignal

void firesignal(signal: RBXScriptSignal, ...)

fires the signal connections (ignoring core/c connections)

getsignalarguments

table<string> getsignalarguments(signal: RBXScriptSignal)

returns signal argument types

cfiresignal

void cfiresignal(signal: RBXScriptSignal, ...)

fires all signal connections, arguments must be of correct types

cansignalreplicate

bool cansignalreplicate(signal: RBXScriptSignal)

returns whenever the signal can replicate or not

replicatesignal

void replicatesignal(signal: RBXScriptSignal, ...)

replicates the signal invocation to the server, arguments must be of correct types

hooksignal

void hooksignal(signal: RBXScriptSignal, hook: function)

hooks the signal connections (ignoring core/c connections), example:

hooksignal(game.Changed, function(connection, ...)
    return 
        true, -- call the original connection function?
        ... -- arguments to pass to the connection function
end)

restoresignal

void restoresignal(signal: RBXScriptSignal)

restores the specified signal connections, errors if not hooked

issignalhooked

bool issignalhooked(signal: RBXScriptSignal)

returns whenever the signal is hooked or not

geteventmember

RBXScriptSignal geteventmember(instance: Instance, event_name: string)

returns the specified signal of the instance, allowing to connect to nonscriptable signals