Signals
Connections, firing, replication, prompt helpers and signal creation.
Returns every connection on an RBXScriptSignal. Aliases: getfriends, get_signal_cons.
local connections = getconnections(workspace.ChildAdded)
print(#connections)
Returns one connection by 1-based index.
print(getconnection(workspace.ChildAdded, 1))
Invokes every connection with the supplied arguments.
firesignal(workspace.ChildAdded, workspace)
Fires a signal through the replication path where possible.
replicatesignal(workspace.ChildAdded, workspace)
Fires a ClickDetector event.
local detector = workspace:FindFirstChildWhichIsA("ClickDetector", true)
if detector then
fireclickdetector(detector)
end
Fires a ProximityPrompt.
local prompt = workspace:FindFirstChildWhichIsA("ProximityPrompt", true)
if prompt then
fireproximityprompt(prompt)
end
Fires touch events.
local part = workspace:FindFirstChildWhichIsA("BasePart", true)
if part then
firetouchinterest(part)
end
Reads or writes a prompt hold duration.
local prompt = workspace:FindFirstChildWhichIsA("ProximityPrompt", true)
if prompt then
print(getproximitypromptduration(prompt))
setproximitypromptduration(prompt, 0.1)
end
Returns the signal replication whitelist.
for _, entry in ipairs(getsignalwhitelist()) do
print(entry)
end
Checks whether a signal can replicate.
print(cansignalreplicate(workspace.ChildAdded))
Returns argument descriptor information.
print(getsignalargumentsinfo(workspace.ChildAdded))
Returns the signal argument signature.
print(getsignalarguments(workspace.ChildAdded))
Internal signal debugging helpers.
local connection = getconnection(workspace.ChildAdded, 1)
print(dbg_conn(connection))
Creates a Lua signal with Connect, Once, Wait, Fire, DisconnectAll and Destroy.
local signal = Signal.new()
signal:Connect(function(value)
print(value)
end)
signal:Fire("hello")
Returns instance:GetPropertyChangedSignal(property).
local part = Instance.new("Part")
getpropertychangedsignal(part, "Position"):Connect(function()
print("position changed")
end)
part.Position = Vector3.new(0, 10, 0)
Connection objects
| Member | Type | Description |
|---|---|---|
| Enabled | boolean | Whether the connection is enabled. |
| Function | function | The registered callback. |
| Thread | thread | The thread that created the connection. |
| Fire | function | Invokes this connection directly. |
| Defer | function | Defers this connection. |
| Disable / Enable | function | Disables or re-enables the connection. |
| Disconnect | function | Disconnects the connection. |
| ForeignState | boolean | Callback belongs to a different Lua state. |
| LuaConnection | boolean | True for Lua callbacks. |
| _TFR / _TTR | number | Internal tracked function/thread references. |