replicatesignal
Sends a signal event to the server as if this client had raised it.
Syntax
replicatesignal(signal: RBXScriptSignal, ...: any) -> ()
Also available as
replicate_signal
Parameters
| Parameter | Type | Description |
|---|---|---|
signal | RBXScriptSignal | An event the server accepts from clients. |
... | any | The event's arguments, of the types it declares. |
Description
Some events, such as ClickDetector.MouseActionReplicated or ProximityPrompt.TriggerEnded, are raised on the client and replicated so the server sees them. replicatesignal sends one of these with the arguments you give. Use cansignalreplicate first to check that the server accepts the event from clients.
Example
local detector = workspace.Button.ClickDetector
print(cansignalreplicate(detector.MouseActionReplicated))
replicatesignal(detector.MouseActionReplicated, game.Players.LocalPlayer, 0)
Notes
- Wrong argument types raise an error; the expected types are listed by
getsignalarguments.
These are Game executor contracts. Check build requirements and session lifetimes before using them.
