I'm trying to make a game, and am trying to get one script to trigger a function in another script. In the script that triggers the event there is an Events.Broadcast() and in the script with the function to trigger there is a Events.Connect() at the end of the script (after the function).
You can use script.context for that, but you need to reference the other script first.
Then you can do: script.context:MyFunction()
The other way is working with broadcasts like you mentioned. You just need to care about the rate limit (usually not a problem) and in which context you want to broadcast (client - server).
Hope this helps
I think you can do this too:
in your script 1 send you the info (ClientContext) :
Then you create a new script you put this in to receive :
If you want to do it in server I think you have to replace with this: :