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?
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.