Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can Remote or Bindable Functions work between 2 Clients?

So I have a LocalScript in one Player, and a LocalScript in another Player. From the LocalScript in one Player, it is supposed to pass a function containing an item to the Other player, where the item can be put into that players CurrentCamera from their LocalScript.

But from what I'm reading on the Wiki, this couldn't happen with Bindable or Remote functions. is this true, and if so is there a work around?

3 comments

2

just use a serverscript as the middleman

0

^^^^

0

So a Remote Function to ServerScript, and when that activates send the function to the other LocalScript? Seems Legit. Thanks!

2 answers

-- Answered by Lukeb50 in Comments

Yes
Technically

As mentioned by Luke, you can use the server as a middleman. Consider this proxy function:

RF.OnServerInvoke = function(p,t,...)
  return RF:InvokeClient(t,p,...);
end;

Which is used by the (invoking) client as

RF:InvokeServer(targetPlayer, ...);

And handled by the receiving client as

RF.OnClientInvoke = function(invokingPlayer, ...)
  return ... -- Code here and all
end;

However, it should be noted that you can not send a function over the network as your question suggests you're attempting to do.

This discussion is preserved as it was. New answers, comments, and votes are closed.