Due to Filtering Enabled I want to use remote events/functions, but the wiki does a poor job explaining things ever since they updated it. Could anyone give me examples of scenarios between client/server communication when it would be needed?
✓ ANSWER ACCEPTED
How would one use Remote Events/Functions?
1 answer
✓ Accepted answer
I can't really think of a logical scenario for this.
--in the LocalScript
local RemoteFunction = --insert RemoteFunction hierarchy here
print(RemoteFunction:InvokeServer("bar")
--end of LocalScript
--in a normal server script
local RemoteFunction = --insert RemoteFunction hierarchy here
function RemoteFunction.OnServerInvoke(variable)
print("foo"..variable)
return "foobar :D"
end
--end of server script
Output:
LocalScript foobar :D
Script foobar
Basically, the LocalScript gives the Script a part of the word "foobar," and the Script prints its part of the word along with the LocalScript's part of the word, to form the whole word. The LocalScript then prints the result that the Script gave it.
EDIT: Return does exactly what it sounds like. It returns objects from a function.
function returnText()
return "hello!"
end
print(returnText) --prints "hello!"
RemoteEvents do the same thing as RemoteFunctions, just RemoteEvents don't return anything, minimizing latency. So basically, RemoteEvents just allow communications between LocalScripts and server Scripts, and vice versa.
This discussion is preserved as it was. New answers, comments, and votes are closed.

8 comments
What dose return do again? Wiki never explained that either. Dose it just update the variable?
Return does exactly what it sounds like. I'll add an explanation in my answer
Where dose it return the value? To the orinal parameter?
What?
I guess my question is what object? You mean the variable right? Btw, I didn't really understand your remote function example. Maybe something with parts? Not just a print function.
Yeah. You can substitute the strings for parts if you want. If you don't know how to do that I can put in another edit
If you can that would be great, thanks for the help.
Ok. I'll do that first thing in the morning. If you could also give me an upvote, that'd be nice.