#Difference in usage / functionality in RemoteEvents vs Remote Functions

1 messages · Page 1 of 1 (latest)

neon sand
#

I understand all about RemoteEvents, and how they use ...:FireServer(), and i also know how Remote functions use ...:InvokeServer() instead. But i want to know, whats the difference in functionality? Since they are both used for Server - Client communication

austere garnet
#

the difference is that remote functions callbacks can only be assigned one time, and a remote function will yield the client thread until the remote function returns something or finishes (returns nil). a remote event on the other hand will just send the signal and not yield and not give anything in return and can be connected multiple times (although that's a bad idea).

neon sand
#

So which is Better / more effective to use

austere garnet
neon sand
#

Ohhh, Tysm!

#

Btw 1 more thing

#

as a S4 do u guys know like 99% of lua(u) and have basically nothing to learn?

austere garnet
#

We're mostly learning advanced techniques to make things more efficient. Generally we have mastered the basics at least.

neon sand
#

a S1's basics and a S4's are vastly different😭😂

austere garnet
#

all coding uses basically the same skills, even between languages once you've learned the important concepts of coding it's just syntax.

worn violet
#

Its really simple if you think about it.

How would you get information from the server to the client? You call a remote function from the client to the server that returns what you are looking for

The player needs to know how much cash they have
player calls InvokeServer() and gets back the cash

The opposite would be if the server wants to tell a player that the game starts in 10 seconds. The server calls FireClient() on a remote event which returns nothing because the server doesnt need anything from the client

feral wyvern
#

and can show it

#

im a scripter but not bothered about the rank here

neon sand
#

Ur prob like? S2 or 3

feral wyvern
#

idk vro