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

Can I get a more elaborate explanation on remote functions?

Asked by 4 years ago
Edited 4 years ago

I am really looking more into the elements that a script can manipulate now that I understand most of the language itself. The specific object I am seeking a more detailed explanation on is RemoteFunctions. I have heard of these, but mostly I rather use remote events.

I appreciate any help :)

2 answers

Log in to vote
1
Answered by 4 years ago

This should help.

https://developer.roblox.com/en-us/api-reference/class/RemoteFunction https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events

Ad
Log in to vote
0
Answered by 4 years ago

they are legit just functions but they communicate across. its just a remote event but with a return. If u just have like a remote:FireClient and then after the client gets it u remote:FireServer then u could just use a remote function

local rf = remotefunction

local results = rf:InvokeClient(5, 10)
print(results)
local rf = remotefunction

rf.OnClientInvoke = function(player, num1, num2)
    return num1 + num2
end

This is an example of how it works. You would use it for stuff that only client can access like guis. You can also invoke server and its simple. you could fire a remote function to buy something and return true if it was succcessful or false if the player was broke.

0
HappyTimIsHim can you go step by step like what all this means on this script . I’m really trying to know how to script :) iivSnooxy 248 — 4y

Answer this question