Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I get the player's username in a remote event?

Asked by 5 years ago

Ok so the player clicks a gui button.

The gui button triggers a local script.

The local script triggers a remote event.

The remote event triggers a regular script.

The regular script does whatever and whatnot, but in this regular script how do I get the username of the player who clicked the gui in the first place?

0
The first parameter of OnServerEvent is the player who fired it, always. pidgey 548 — 5y
0
This isn't a request site. Show us the code. ChasingNachos 133 — 5y

1 answer

Log in to vote
2
Answered by 5 years ago

As the comment said, the first parameter of onServerEvent is the player from the client who invoked/fired it.

0
Thx, I was just doing game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function() barrettr500 53 — 5y
Ad

Answer this question