Syntax
replicatesignal(signal: RBXScriptSignal, ...arguments?: ...any)Aliases
replicateeventArguments
| Name | Type | Description |
|---|---|---|
signal | RBXScriptSignal | The RBXScriptSignal whose owning instance event invocation function should be called. |
...arguments? | ...any | Lua arguments converted according to the signal signature. Extra arguments beyond the signature length are ignored. |
Description
Invokes the replication path for an RBXScriptSignal. The function reads the signal signature, converts provided Lua arguments into Roblox signal values for each signature type, truncates extra Lua arguments beyond the signature length, then calls the owning instance event invocation function.
Call it with 2 parameter(s): signal, ...arguments. The argument table explains which values are required and which ones only refine the behavior.
It does not return data. Treat the call as an action and handle errors around the call site when needed.
Example
Replicate for a RemoteEvent signal with values that match the signal signature.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remote = ReplicatedStorage:FindFirstChild("RemoteEvent")
if remote and remote:IsA("RemoteEvent") then
replicatesignal(remote.OnClientEvent, "hello")
end