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

What is a Remote Function?

I seen it in Lua Model Maker's admin just I dont know how to use it. XD Can someone explane to me what a Remote Function is? Or at least how to use it because I do know one thing about "Remote Events" I use them at the moment.

game:GetService('ServerScriptStorage').RemoteEvent:FireClient()

So anyways can someone please explane to me what a "Remote Function" is?

1 answer

✓ Accepted answer

A RemoteFunction is similar to a RemoteEvent. The only difference is that the RemoteFunction is a callback, and the RemoteEvent is connected to an event. Use a RemoteFunction when you want to return something.

Q: What makes RemoteFunctions/RemoteEvents different from Bindable Functions/Bindable Events? What makes the RemoteFunction and the RemoteEvent unique is that is crosses the client-server communication border (that's why they are used in games using Filtering). Meaning a client can communicate with the server.

1 comment

1

The reason both exist is because Function objects will yield until returned, and Event objects will not. At one point, you had to use Event objects if you wanted to yield the function being invoked, no longer applicable now.

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