ReferenceSignals

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

ParameterTypeDescription
signalRBXScriptSignalAn event the server accepts from clients.
...anyThe 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

These are Game executor contracts. Check build requirements and session lifetimes before using them.