|
| 06 Jun 2017 12:47 PM |
| Is their a way to send a value to a server through a remote event. so like a local script triggers a remote event but sends the players name? |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2017 12:59 PM |
If I'm understanding your question correctly, then it would be fairly easy
--first add the remote x = Instance.new("RemoteEvent", game.ReplicatedStorage) x.Name = "NameEvent"
--//Client side local player = game.Players.LocalPlayer;
game.Players.PlayerAdded:connect(function(player) game.ReplicatedStorage.NameEvent:FireServer(player) end)
--//Server side game.ReplicatedStorage.NameEvent.OnServerEvent:connect(function(player) print(player.Name) end) |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2017 01:01 PM |
| maybe it's not the answer you're looking for, apologies if that's the case. I didn't understand the question very well |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2017 01:10 PM |
| No thats exactly what i wanted, thank u |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2017 01:23 PM |
um no the player who fired the event is automatically included as the first argument so thats wrong |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2017 02:49 PM |
| He wanted it to send the name, not have it included as an 'invisible' arg |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2017 03:00 PM |
yes but ur not using the player u sent ur using the player who fired the event |
|
|
| Report Abuse |
|
|