Can clients control others clients Local scripts?

I’m creating a RPG game and wondering: What is the best way to send to player his data when he connected. So, my idea is to create module script in a player, which Ill use to send data from server, and then, that script will send that data via BindableFunctions and Events to other local script for a player. I don’t know, is it better just use remote event and send to player his data. But have a question: Can hackers controll that module script to load incorrect data of player to others clients?

I don’t think that will be better than remote event, but that will be worse.
Because, anyway, you need to replicate and send to player his data, but with a remote event that will be easier to code and more secured. Am I right?

Module scripts can be on the server or on the client, so depending if its on the server or client, hackers can control the scripts.

But If I place it in other player or character, and that module script could use local scripts of that client - can a hacker use it too? Or just a server?

I went into studio, and put an empty module in starter character scripts and booted up a 2 player server, and I could access the other players module script. But if they change it, it wont replicate to the other clients.

Does that answer your question?

Yep, thats a solution of topic.
But can you answer: Isn’t that will be better to send data directly to player via remote events, not with a module scripts?

I think it would be better to use remote events, just put some safety measures on the server so hackers don’t overload the server.

1 Like

Technically, yes, but not in the way you think.

If you place module scripts under another player, other clients can view those module script and access them. But, that does not mean they can actively change the contents of those scripts and for it can replicate to other clients. Any changes made within scripts on one client is localized to that client only.

For example, let’s take one module script visible to two clients (Client A and Client B). The module’s code is as follows:

return {
    someValue = "foo"
}

When client A requires that module and changes someValue to "bar", client B’s module will still have the value of "foo".

So, yes, they can technically “control” other player’s local scripts but any changes made will only affect themselves, not other players.

1 Like