BindableEvent
Overview
Properties
Methods
Fire
Parameters
Return
Code Samples
Events
Event
Parameters
Code Samples
See also
BindableEventLast updated
-- Script1 (or LocalScript1)
local ServerScriptService = game:GetService("ServerScriptService")
local BindableEvent = ServerScriptService:WaitForChild("BindableEvent")
local function SomeEvent(text)
print("[SomeEvent]", "Parameter : ", text)
end
BindableEvent.Event:Connect(SomeEvent)
-----------------------------------------------------------------------------------
-- Script2 (or LocalScript2)
local ServerScriptService = game:GetService("ServerScriptService")
local BindableEvent = ServerScriptService:WaitForChild("BindableEvent")
local SomeText = "BindableEvents"
BindableEvent:Fire(SomeText) -- Passing argumentslocal ServerScriptService = game:GetService("ServerScriptService")
local BindableEvent = ServerScriptService:WaitForChild("BindableEvent")
local function SomeEvent(text)
print("[SomeEvent]", "Parameter : ", text)
end
BindableEvent.Event:Connect(SomeEvent)