Dear Developers,
I wanted to ask if there would be a way to send Data, Tasks, Information from one script to another one.
Example:
local script sends - Information / Task / Function / Item name > to a script
The impotant thing is Item Names or Values.
Like:
local script sends (from StarterGui) - Item Name / Value / Gui Name - > to a script (in workspace) , so it can check and configure it (for saving, etc.)
Thank you for reading; Im happy for every suggestion / help!
Use RemoteEvents. You have a LocalScript in StarterGUI, it fires a RemoteEvent to the server. The server then reads the parameters and does what it needs to that you can code yourself.
global variables, such as b = 1, are only accessible to the script it’s defined in. If you’re referring to _G, no, don’t use it: using _G isn’t practical, and you won’t even be able to send data from server > client with this because _G can only share data among scripts with the same context level (script, local script)
@grimm0rep This question has been asked many times, please search the devforum or anywhere else before you post
Read this article about Remote Functions and Events, as it can help you send data in parameters through FilteringEnabled. With Remote Functions, you can send data from LocalScripts to server Scripts, or vice versa; doing all of this through FilteringEnabled on, so you can prevent most exploits, and filter what data can or can not be transmitted between scripts. I hope this works as a solution!
Hello, i’m trying to send information from one server script to another server script is there already a solution of that? if so can u tell me, thank you.
You can use BindableEvents or structure your game with ModuleScripts instead so that it’s possible to pass information to that ModuleScript either via a function, a BindableEvent or a custom signal class.