replicatesignal
Fires a signal with server replication.
Syntax
replicatesignal(signal: RBXScriptSignal, ...: any) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
signal | RBXScriptSignal | The signal to fire |
... | any | Arguments to pass |
Returns
This function does not return a value.
Description
replicatesignal asks the engine to replicate a supported signal to the server. The argument list must exactly match the signal's engine signature; unsupported signals cannot be replicated.
Example
local Players = game:GetService("Players")
local detector = workspace:FindFirstChildWhichIsA("ClickDetector", true)
assert(detector, "This example requires a server-created ClickDetector")
replicatesignal(
detector.MouseActionReplicated,
Players.LocalPlayer,
0
)Difference from firesignal
| Function | Local | Replicates |
|---|---|---|
firesignal | ✅ | ❌ |
replicatesignal | Depends on the signal | ✅ for supported signals |
Use Cases
- Interaction testing: Exercise supported engine interactions from the client
- Argument validation: Verify that an engine signal accepts the expected signature
Notes
- Not all signals can be replicated
- Incorrect argument counts or types throw an error
- Server validation may still reject the action
Related Functions
firesignal- Fire locally onlygetconnections- Get connections