You can write your topic however you want, but you need to answer these questions:
What do you want to achieve?
For the game that I have been developing, I am making an arrest system (for a police-esque game). I am developing an arrest system that will have numerous features for what you can do with your detainee. I made a feature that allows for searching, but it first asks for the consent of the other player being detained. Upon them clicking yes, I want the local script inside of the arrest tool to know that the detainee said yes and show the detainee’s inventory.
What is the issue?
I have been trying to have the officer’s arrest tool local script read the decision made by the detainee and act upon it.
What solutions have you tried so far?
I have tried to create a RemoteEvent but cannot seem to transfer the information from the local script inside the GUI button from the detainee to the officer’s arrest tool local script.
I have the officer’s arrest tool local script fire an event that gives the detainee a GUI. I just don’t know how to send the decision of the detainee (Yes/No) and give a response back to the officer’s GUI.
Well, you can use a bindable, but I would use a remote function. Player Pressed Yes --> Send Remote Function to Server to retrieve inventory --> Then update the client accordingly
Then if you want to send it to another local script (I would personally use module scripts) but you can use a bindable and then fire that and have it connect to the local script that you want the information on.
Officer wants to search someone. Send information to the server: the target
Server sends the name of the officer to the target player and the UI pops up.
When the target clicks yes or no, it fires the result (1 = yes, 0 = no, or use boolean) along with the name of the officer which should have been provided by the server in step 2.
Server sends the result to the officer.
What’s the problem? What information are you trying to transfer?