cansignalreplicate

Checks if a signal can be replicated to the server.

Syntax

cansignalreplicate(signal: RBXScriptSignal) -> boolean

Parameters

ParameterTypeDescription
signalRBXScriptSignalThe signal to check

Returns

TypeDescription
booleanTrue if the signal can replicate

Description

cansignalreplicate returns whether the signal supports replication.

Example

local detector = workspace:FindFirstChildWhichIsA("ClickDetector", true)
assert(detector, "This example requires a server-created ClickDetector")
local signal = detector.MouseActionReplicated

if cansignalreplicate(signal) then
    replicatesignal(signal, game.Players.LocalPlayer, 0)
else
    print("This signal cannot be replicated")
end