replicatesignal
Replicate a client-side signal event to the server with matching arguments.
function replicatesignal(signal: RBXScriptSignal, ...: any?)Synopsis
How it works
Similar to
firesignal, but also initiates replication so the server processes the event. For RemoteEvent signals, this is equivalent to the client calling :FireServer() under the hood. The signal’s connections on the client are fired and a network packet is sent to the server.Security note
Because the server receives the event, server-side validation still applies. The advantage over calling
:FireServer() directly is that replicatesignal can fire signals that the game code doesn’t expose through a convenient API, or trigger them from a context where the RemoteEventRemoteEventA Roblox Instance for one-way client-server communication. :FireServer() sends data from client to server; :FireClient() sends from server to client. Commonly intercepted by executor hooks on __namecall. reference is hidden.Usage
Replicate a ClickDetector mouse event
local detector = workspace.SomePart.ClickDetector
replicatesignal(detector.MouseActionReplicated, game.Players.LocalPlayer, 0)Parameters
signal RBXScriptSignal The signal to replicate to the server.
... any optionalArguments matching the signal's expected parameter types.
Arguments must match
Passing the wrong argument types will throw an error. Check the Roblox API reference for each signal's parameter types.