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

How does RemoteEvent work?

Asked by 10 years ago

So im trying to make a script share some data to a local script and the wiki says to use a RemoteEvent to give data to local script, but it lacks any documentation. Could someone explain or point to a good tutorial?

0
But every method has a description. Trioxide 79 — 10y

1 answer

Log in to vote
4
Answered by
Bebee2 195
10 years ago

Because of the bulkiest of an iPad, I'll just try to give as short of a short synopsis as possible.

There is OnClientEvent and OnServerEvent events.

Server scripts can link to the OnServerEvent while Local scripts link to the OnClientEvent.

OnServerEvent fires when you call FireServer Method on the RemoteEvent and the first argument will always be the player who fired the server. Only LocalScripts can invoke server.

OnClientEvent fires when FireClient (which requires a player parameter to fire at a specific client) or FireAllClients (which fires all clients without a need of a player parameter). Only server scripts can do this.

In these Fire methods, you can also give extra parameters to give extra arguments.

0
Thanks for this! Irule10 5 — 10y
Ad

Answer this question