BindableEvent
๊ฐ์
BindableEvent๋ฅผ ์ด์ฉํ์ฌ, ์๋ฒ์ ์๋ฒ ๋๋ ํด๋ผ์ด์ธํธ์ ํด๋ผ์ด์ธํธ์ ๊ฐ์ด ๊ฐ์ ํ๊ฒฝ๋ด ํต์ ์ฒ๋ฆฌ๋ฅผ ๊ตฌํํ ์ ์์ต๋๋ค.
BindableEvent ์ค๋ธ์ ํธ
BindableEvent๋ ๊ฐ์ ํ๊ฒฝ๊ฐ์ ์ด๋ฒคํธ๋ฅผ ์ฒ๋ฆฌํ๊ธฐ ์ํด ์ ๊ณต๋๋ ์ค๋ธ์ ํธ๋ก ๋จ๋ฐฉํฅ ํต์ ์ ์ง์ํฉ๋๋ค.

๐ก Tip. BindableEvent์ ์ฉ๋๊ฐ ์๋ฒ์์ ์๋ฒ๋ก์ ํต์ ์ธ์ง(Server to Server), ํด๋ผ์ด์ธํธ์์ ํด๋ผ์ด์ธํธ๋ก์ ํต์ ์ธ์ง๋ฅผ(Client to Client) ๋ช
ํํ ๊ตฌ๋ถํ๊ธฐ ์ํด, ์ด๋ฆ์ ์ ๋์ด๋ก S2S_ ๋๋ C2C_๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค. ์ด๋ ์ด๋ฒคํธ์ ์ญํ ์ ์ง๊ด์ ์ผ๋ก ์ดํดํ ์ ์๊ฒ ํ์ฌ ์ฝ๋์ ๊ฐ๋
์ฑ๊ณผ ์ ์ง๋ณด์์ฑ์ ๋์
๋๋ค.

BindableEvent๋ฅผ ์ด์ฉํ ํต์ ๊ตฌํ
BindableEvent๋ก ์ด๋ฒคํธ ๋ฐ์ก์ ์ธ์(Arguments)๋ฅผ ํจ๊ป ์ ์กํ ์ ์์ต๋๋ค. ์ธ์๋ Fire ๋ฉ์๋ ํธ์ถ ์ ์ ๋ฌ๋๋ฉฐ, ์์ ์ธก์์ ํด๋น ๋ฐ์ดํฐ๋ฅผ ์ฝ๋ฐฑ ํจ์๋ก ๋ฐ์ ์ ์์ต๋๋ค.
Server โก Server
Script1์์
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local S2S_SomeEvent = ReplicatedStorage:WaitForChild("S2S_SomeEvent")
local function TestFire()
local SomeText = "BindableEvents"
S2S_SomeEvent:Fire(SomeText) -- Passing arguments
endScript2์์
Client โก Client
LocalScript1์์
LocalScript2์์
Last updated