Signals

getsignalargumentsinfo

Returns an array table of argument info from an RBXScriptSignal signature.

Syntax

getsignalargumentsinfo(signal: RBXScriptSignal): {{Name: string, Type: string}}

Arguments

NameTypeDescription
signalRBXScriptSignalThe RBXScriptSignal whose event descriptor signature should be inspected.

Returns

NameTypeDescription
argumentInfo{{Name: string, Type: string}}An array table where each entry has Name and Type strings. If the signature cannot be read or has no entries, the function returns one fallback entry with Name set to arg1 and Type set to Variant.

Description

Returns an array table of argument info from an RBXScriptSignal signature. It does not return captured runtime argument values.

Call it with 1 parameter(s): signal. The argument table explains which values are required and which ones only refine the behavior.

It returns argumentInfo ({{Name: string, Type: string}}). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Inspect an RBXScriptSignal signature and print each argument name with its type name.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remote = ReplicatedStorage:FindFirstChild("RemoteEvent")

if remote then
    for _, argument in ipairs(getsignalargumentsinfo(remote.OnClientEvent)) do
        print(argument.Name, argument.Type)
    end
end