I am creating a tool that makes use of both a script and a local script. I am trying to do the same type of thing as a remote event but between the 2 scripts. Basically, the script communicates to the local script to run a function. I don’t really know where to start with this.
what is the function supposed to do that it has to be on a local script?
Well, first, take a look at the documentation: RemoteEvent | Documentation - Roblox Creator Hub
Since you want the script to tell the client to do something, you want to use the :FireClient(client, args)
method.
Remote events are what you need. These events allow two-way communication between the server and the client. Look into FireClient()
for script to local script (don’t forget the first parameter must always be the player who’s client you are firing), FireAllClients()
will send a message to all clients (no need to pass the player because it will be broadcast to all clients), and finally FireServer()
which goes from client to server (no need to supply the player here, the server can easily determine which client sent it).
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.