Signals
Fire signals programmatically, inspect their connections, and replicate them across the network boundary.
Roblox events are RBXScriptSignal objects with a list of connections. This library reads that list, fires signals without whatever normally fires them, and (when the engine allows it) sends a signal back over the network.
Firing and inspecting
local remote = game:GetService("ReplicatedStorage"):WaitForChild("Reward")
-- Run whatever the game connected, locally, with your arguments.
firesignal(remote.OnClientEvent, 9999)
-- Or look at the handlers first.
for _, connection in ipairs(getconnections(remote.OnClientEvent)) do
print(connection.Function, connection.State)
connection:Disable() -- and turn one off
endConnection objects are proxies. Each one has the handler function, its state, and methods to disable, enable or fire it on its own. Use connection.Function with debug.getupvalues to read what a handler captured.
These describe a signal instead of doing anything with it: what arguments it takes, and whether the engine will let it replicate.