Best way to send values from script to script (that changes every time)

I am looking for the best way to send two values from one server script to another and then make it run a function with it. I have tried searching but I have only seen answers for non-changing data (for which they recommend modulescripts). Note that the data will change every time in my scenario .

You can use modules, or you can try using BindableEvents, which are RemoteEvents but with the same type of scripts.

1 Like

you could use modules or bindableevents (like the person said above) or you could use _G.variablename if the scripts are on the same context level. For example:

Script1: _G.value = “idksomevalue”
Script2: print(_G.value)

1 Like