In what specific situations would you use each for? And can you create a functioning game with one or the other?
Here’s a basic summary:
The RemoteEvent object facilitates asynchronous, one-way communication across the client-server boundary without yielding for a response.
(Referenced from this.)
and
The RemoteFunction object facilitates synchronous, two-way communication across the client-server boundary. You can use it to define a custom callback function and invoke it manually by calling RemoteFunction:InvokeClient() or RemoteFunction:InvokeServer(). The code invoking the function yields until it receives a response from the recipient.
(Referended from this.)
TL;DR: So basically use RemoteEvents if you need to “tell” the client or server to do something and use RemoteFunctions if you need to get an answer for something from the client or server.
I use RemoteFunctions when I want to wait for the servers/clients response or get information from the server/client
I use RemoteEvents when I don’t want to wait for any response nor get information back.
Thanks! this makes a lot of sense, I have worked with the two before but I haven’t really understood in depth of their uses even though I’ve always used them correctly
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.