Volt

firesignal

Fires a signal with the given arguments.

Syntax

firesignal(signal: RBXScriptSignal, ...: any) -> void

Parameters

ParameterTypeDescription
signalRBXScriptSignalThe signal to fire
...anyArguments to pass to handlers

Returns

This function does not return a value.

Description

firesignal triggers all connected handlers of a signal with the provided arguments. This simulates the signal being fired naturally.

Example

-- Fire a button's MouseButton1Click
local button = PlayerGui.ScreenGui.TextButton
firesignal(button.MouseButton1Click)

-- Fire with arguments
firesignal(someObject.CustomEvent, "arg1", 123, true)

Firing Input Events

-- Simulate a key press
local UserInputService = game:GetService("UserInputService")

local inputObject = Instance.new("InputObject") -- Pseudocode
firesignal(UserInputService.InputBegan, inputObject, false)

Firing Touch Events

local part = workspace.TouchPart
local character = game.Players.LocalPlayer.Character
local hrp = character.HumanoidRootPart

-- Fire the Touched event
firesignal(part.Touched, hrp)

Notes

  • All connected handlers will be called
  • Arguments are passed to each handler
  • Use getconnections to fire specific connections only

On this page