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

how do I check who sent on the remote event thing?

Asked by 5 years ago

so I have made this script which basically when someone presses a certain key, everyone excluding the presser will die, basically a kill others, but I'm having difficulty in making it. Can anyone tell me how do I check who sent the signal, so I can exclude the presser from being killed?

1 answer

Log in to vote
0
Answered by
Elixcore 1337 Moderation Voter
5 years ago
Edited 5 years ago

When you fire a remote, the server will automatically receive your player as the first parameter.

--localscript

Remote:FireServer()

--serverscript

Remote.OnServerEvent:Connect(function(player)
    print(player)
end)

That will print the player who sent the remote.

Ad

Answer this question