Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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?

2 comments

0

The first parameter of OnServerEvent is the player who fired it, always.

0

This isn't a request site. Show us the code.

1 answer

✓ Accepted answer

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

1 comment

0

Thx, I was just doing game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function()

This discussion is preserved as it was. New answers, comments, and votes are closed.