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

How would I secure a remote event?

Asked by 4 years ago
Edited 4 years ago

i want to secure my remotes from exploiters firing them. but, how would i do that?

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

You can do this by putting another value where it can verify, so if exploiters fires using your remote evet without the verify code, it won't do anything

LocalScript

local re = (your remote event)
local verifycode = "verify123"

re:FireServer("what you want to fire", verifycode) -- verifycode is needed in order to check the code is from verified or not

Script (Server)

local re = (your remote event)
local verifycode = "verify123"

re.OnServerEvent:Connect(function(theStuff, verifycodefromclient)
    if verifycodefromclient == verifycode then
        -- code here
    end
end)

So example if I want to change my money from a special developer GUI using remote event I can do this

LocalScript

local re = game.ReplicatedStorage.RemoteEvent
local verifycode = "developercode1337"

script.Parent.UpdateMoney:Connect(function()
    re:FireServer(script.Parent.MoneyAmount.Text, verifycode)
end)

Script (Server)

local re = game.ReplicatedStorage.RemoteEvent
local verifycode = "developercode1337"

re.OnServerEvent:Connect(function(moneyAmount, verifycodefromclient)
    if verifycodefromclient == verifycode then
        -- And the stuff here
    end)
end)

So if an exploiter executes a fire event without the verify code, it will not do anything, this is safe until exploiters found out however if you want it to be safe and even exploiters found out about this system, I suggest you finding something that can make the code confusing exploiters

0
Doesn't help since remotespy exists and any exploiters can easily see the code robloxianmirror 57 — 4y
0
ever heard of remote spy... ZorbaTheGreatGreek 59 — 4y
Ad

Answer this question