Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

What is a Remote Function?

Asked by 9 years ago

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

Log in to vote
1
Answered by
l0cky2013 135
9 years ago

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
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. adark 5487 — 9y
Ad

Answer this question