I have a question, what are bindable functions? Is it where the code waits for the next code to execute? Or if somebody was touching a part and it’ll go to the client and does something else?
i don’t think i never used bindable functions ever
I have a question, what are bindable functions? Is it where the code waits for the next code to execute? Or if somebody was touching a part and it’ll go to the client and does something else?
i don’t think i never used bindable functions ever
Ummmmmmmmm you may want to take a look at the wiki. To be clear, since the wiki page is kind of short, bindable functions are sort of like remote functions, except they are meant for scripts on the same side.
For example, remote functions communicate between server scripts and client scripts. A bindable function would communicate between two (or more) server scripts, OR 2 (or more) client scripts. It’s more for if you have segmented your code into multiple scripts, yet they are intertwined by some function you are calling.
So we can fire twice from a client to another client then? ill take a look
ok I have a client and client code;
local Chat = game.ReplicatedStorage.Chat
local function AddNumbers(numb, bume)
if numb and bume then
return numb + bume
end
end
Chat.OnInvoke = AddNumbers
print(Chat:Invoke(25, 25))
You could make short code with this
BindableFunctions allow you to communicate from server → same server or client → same client, but do not allow you to communicate from client → another client.
They came out long before ModuleScripts did. While BindableEvents can still be useful, you should prefer ModuleScripts over BindableFunctions in all cases.
Notably passing tables through them and BindableEvents directly can be expensive, since all the tables are encoded and decoded. That process also loses all non-string and non-array keys in any table arguments, and the table you receive in the BindableFunction invoke handler will not be equal referentially to the table you passed in.
Yielding information is available on the Developer Hub article.