What's the best way to directly and privately send data to client from server?

I’m making a game where players can host their own servers and I want players to be able to join their friends’ servers. What’s the best way to directly and privately send data to the client from the server? I’m thinking about using RemoteEvents to send the data, but I was wondering if there is a better way.

2 Likes

Remove events would be the way, yes.

1 Like

If you want to send data only a certain player should have access too, use :FireClient(player,data) with a remote event.

Exploiters won’t have access to any other player’s secrets as the server → client connection is secure. However, the client itself will have access, so make sure what you send to the client isn’t something that should be kept secret from them.

2 Likes

In case you haven’t already seen this article this explains in-depth how to use remotes.