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

Remote Events: How to get the name of the player the event was fired by?

I don't know how to get the name of the client which the Server event was fired by. Anyone know how?

1 answer

✓ Accepted answer

The first argument on OnServerEvent is the player that fired it. Just use player.Name

LocalScript

RemoteEvent:FireServer("hello")

Script

RemoteEvent.OnServerEvent:Connect(function(player,word)
	print(player.Name)
	print(word) --> hello
end)

Just remember that the player parameter goes first, so although "hello" is the first argument in the LocalScript, it is the 2nd parameter in the script.

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