What's the difference between RemoteFunctions, and RemoteEvents?

I’m trying to comprehend what the difference is between remotefunctions, and remoteevents like they literally do the same thing from my perspective so what seperates them into their own category?

1 Like

Remote Events are used to send data one way, these can trigger functions or cause an event to happen, however no value is returned and the script that fired the event does not wait for the function to return something.

Remote Functions on the other hand can be used to get returns from the client / server. Say for example you want to validate if a player is able to craft something, instead of checking on the client which is unsecure you can check on the server (okay this Is an awful example since you would want to check on the server when the craft button is pressed but whatever)

Each have their separate uses.

Hope this helped :slight_smile:


Plug-in warning about RemoteFunctions: if you intend to have the server query data from the client, you better be ready to put time into a wrapper that cordons off the call into a separate pseudothread. The client is capable of permanently hanging the server by changing the OnClientInvoke function to not return anything.

Just to add on to this, if you really need to poll data from a client, just fire an event to request client data (as opposed to invoking a RemoteFunction to the client). It makes things easier to handle timeouts and such.