I'm trying to find a way to pass information server - server, without the client being able to modify it. I know _G but I'm not sure if the Client is able to modify it.
How to pass information server - server?
1 answer
Since filtering enabled, client cannot modify anything on the server, with few minor exceptions (his own avatar position for example). Unless you specifically allow clients to modify it on the server (through RemoteEvents or RemoteFunctions), _G is safe from exploits. Client has its own _G that is separate from client. If you are a paranoid, try to modify _G only in ServerScriptService or ServerStorage, as these are completely hidden from client.
Now to answer your question, _G is easiest way to achieve server to server. But you should really use BindableEvents instead, as you may have problems with synchronization (one script reads value, before that value is set). Best practice however is to structure your code to use ModuleScripts, avoiding situations where scripts need to communicate with each other at all. While sometimes unavoidable, less internal scripts communication, the better.
1 comment
Thanks
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
I cannot understand your question?
Bruh why do you want to pass information from the server to the same server if the information is already there that's not a thing -_-
i dont think you understand what im trying to do, im trying to transfer information server-server without the client being able to modify or see it, you clearly dont know what im talking about but its really useful
plus its just helpful in general to share server - server especially if you're trying to make an anti exploit. For example I'm trying to make an Among Us game unlike the other Among Us chinese knock offs that dont even put effort into them. I want to tell each Server-Script which player is the imposter so I can allow them to vent ect. This is very useful for that instead of making values