Hello Devs! This is my second topic and i got a proplem today that i think iam a bit stupid in, so basically i got a script that whenever a button is pressed it fires for all players and clones the gui and etc , among the gui there is a text label that the player name should be but the name is only the local player’s name and i want it to be for the player who fired the remote event first so i made a remote event and everything but the proplem is that i had to fire the server first then fire all clients i did that well but i cant pass the name of the player throught the firing of all clients only the server here is the part of the script that fires the server(its a local script)
as you can see the player name only reaches this script but not the other that handles the gui, if u want the script that receives the all players firing just mention me.
Hope yall have a good day
On the Local Script that will receive the FireAllClients signal, just use the player who pressed the button’s name which you passed down as an argument.
Create a Local Script that will receive the signal and just have your code there.
game.ReplicatedStorage.Recieve.OnClientEvent:Connect(function(playername)
-- your code here, playername is the name of the player who clicked the button that was converted as a string
end)
You got the playername argument in the server script from the OnServerEvent which returned you by default the player who fired the event, you then pass down the name of that player to all clients through the “playername” argument.
That should be good, now go on your Local Script that will receive the signal through OnClientEvent and you should have the player who clicked the button’s name as an argument.