Client

Note: We use the ClientModuleLoad event here instead of PlayerJoin. If you try to use PlayerJoin, the client may not have loaded their scripts yet and nothing will happen.

Notes

Server/client Network:Send

Server

Network:Send(player, event_name)

Network:Send(player, event_name, argument)

Client

Network:Send(event_name)

Network:Send(event_name, argument)

Network:Subscribe

It works very similarly to Events:Subscribe. There are two versions: one for functions, and one for class functions.

Network:Subscribe(event_name, function)

Network:Subscribe(event_name, instance, function)

On the server, the function you give to Network:Subscribe can have two parameters: the argument and the player who sent the network event. Or sometimes just one, depending on if the client sent an argument or not. (This behaviour is questionable, but there's not much that can be done at this stage.) So, your function can look like the following: