Question
Why should I use a RemoteFunction if RemoteEvents do basically the exact same thing?
Extra
Just to know I have this right:
RemoteEvent - Replicate stuff to server/client
RemoteFunction - Replicate to server then back to client
Why should I use a RemoteFunction if RemoteEvents do basically the exact same thing?
Just to know I have this right:
RemoteEvent - Replicate stuff to server/client
RemoteFunction - Replicate to server then back to client
RemoteFunctions and RemoteEvents are are different for this one key reason:
Basically, if you need the result of some function to be returned use a RemoteFunction. If you do not need the result, but simply need some event to be triggered, use a RemoteEvent. There are also some tricky bugs then can occur if a RemoteFunction is not set up properly. This arctile goes over use cases for both RemoteEvents and RemoteFunctions and also explains the pitfalls you may run into.
Remote Functions and Events (roblox.com)
Oh so RemoteEvents fire the server/client and just keep running the same script whereas RemoteFunctions invoke the server and stop the whole script until the script it was called on is complete?
Almost… Neither RemoteEvents nor RemoteFunctions have the ability to start scripts, instead they start functions. Replace “script” with “function” or “thread” in your reply and that’s closer to a correct idea of what’s going on.