sunc docs
  • sUNC Introduction
  • Closures
    • hookfunction
    • hookmetamethod
    • newcclosure
    • iscclosure
    • islclosure
    • isexecutorclosure
    • clonefunction
    • getfunctionhash
  • Cryptography
    • crypt.base64encode
    • crypt.base64decode
  • Debug
    • debug.getconstants
    • debug.getconstant
    • debug.setconstant
    • debug.getupvalues
    • debug.getupvalue
    • debug.setupvalue
  • debug.getstack
  • debug.setstack
  • debug.getprotos
  • debug.getproto
  • Drawing
    • Drawing.new
      • Drawing Objects
    • cleardrawcache
    • getrenderproperty
    • setrenderproperty
    • isrenderobj
  • Environment
    • getgenv
    • getrenv
    • getgc
    • filtergc
  • Filesystem
    • appendfile
    • writefile
    • readfile
    • listfiles
    • isfile
    • delfile
    • loadfile
    • makefolder
    • isfolder
    • delfolder
    • getcustomasset
  • Instances
    • fireproximityprompt
    • fireclickdetector
    • firetouchinterest
    • getinstances
    • getnilinstances
    • cloneref
    • gethui
    • getcallbackvalue
    • compareinstances
  • Metatables
    • getrawmetatable
    • setrawmetatable
    • setreadonly
    • isreadonly
  • Miscellaneous
    • identifyexecutor
    • request
  • Reflection
    • gethiddenproperty
    • sethiddenproperty
    • setscriptable
    • checkcaller
    • setthreadidentity
    • getthreadidentity
  • Scripts
    • getscriptbytecode
    • getscripthash
    • getscriptclosure
    • getsenv
    • getscripts
    • getrunningscripts
    • getloadedmodules
    • getcallingscript
    • loadstring
  • Signals
    • getconnections
      • The Connection object
    • firesignal
    • replicatesignal
  • Websocket
    • WebSocket.connect
Powered by GitBook
On this page
  • Parameters
  • Examples
  1. Signals

replicatesignal

PreviousfiresignalNextWebSocket.connect

Last updated 2 months ago

For an accurate result from the example, test the function in .

Also note that some signals might have different namings. For all the current replicable signals, visit

If possible, replicates the signal to the server with the provided arguments. The arguments must also match accordingly to the signal itself. To know a signal's arguments, visit .

function replicatesignal(signal: RBXScriptSignal, ...: any?)

Parameters

  • signal - The signal to be fired/replicated.

  • ...? - The wanted arguments to pass into signal.


Examples

local Path = workspace.replicatesigmal
replicatesignal(Path.ClickDetector.MouseActionReplicated, game.Players.LocalPlayer, 0)
task.wait(0.1)
print(game.Players.LocalPlayer:GetAttribute("MouseClickReplicated")) -- Output: true
local Path = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame
replicatesignal(Path.MouseWheelForward) -- Throws an arg error
replicatesignal(Path.MouseWheelForward, 121) -- Throws an arg error
replicatesignal(Path.MouseWheelForward, 121, 214)
task.wait(0.1)
print(game.Players.LocalPlayer:GetAttribute("MouseWheelForwardReplicated")) -- Output: true

our game
this
this