-- 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 arguments
local ServerScriptService = game:GetService("ServerScriptService")
local BindableEvent = ServerScriptService:WaitForChild("BindableEvent")
local function SomeEvent(text)
print("[SomeEvent]", "Parameter : ", text)
end
BindableEvent.Event:Connect(SomeEvent)