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

How can i fix a bait remote from banning innocent players?

Asked by 1 year ago
Edited 1 year ago

So what i have is a bait remote called "admin". On launch, a serverscript will then ban the player that had the name sent through the remote event from a local script some exploiter put in..but, theoretically, if they put someone else's name in there, it'd just ban the innocent player. How can i prevent this? Is there some way at all? Im not asking for a script, but is there something for this, im pretty new to scripting.

0
I don't recommend using RemoteEvents as a bait since hackers won't easily fall for it anymore. T3_MasterGamer 2189 — 1y

1 answer

Log in to vote
1
Answered by
pwx 1581 Moderation Voter
1 year ago

The first parameter any RemoteEvent will send over on the FireServer() event would be the player who called it. They cannot put "anyone else's" name in.

Exploiter's Client:

AdminEvent:FireServer(game.Players['noob123'])

Server:

AdminEvent.OnServerEvent:Connect(function(Player, noob123)
    -- here you can ALWAYS ban the Player, because it would ALWAYS be the exploiter firing the remote as the first parameter. Any other data they send over you can just ignore.
end)
Ad

Answer this question