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

How can I confirm values passed through remote event ?

Asked by 4 years ago
Edited 4 years ago

I would like to confirm values passed through a remote event for a anti-exploit system:

Local Script:

local char = script.Parent
local RemoteEvent = game.ReplicatedStorage.Events.RemoteEvent
local uis = game:GetService('UserInputService')
local combinded = {} -- to pass more value through if necessary

uis.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.B then
        BindableFunc:FireServer(combinded)
    end
end)


Server Script: local RemoteEvent = game.ReplicatedStorage.Events.RemoteEvent function Key(combinded) local RandNumber = math.random(1, 1000000) local Letters = {'a', 'b', 'c'} combinded = RandNumber end RemoteEvent.OnServerEvent:Connect(Key)

I have got this far but don't understand how I could possibly check the values being passed through, I thought about using a if statement, but don't understand how that would work either.

0
Please explain what you are trying to accomplish with your code. Also, you aren't always able to 'verify' everything you receive through the Remotes alphawolvess 1784 — 4y
0
Honestly, I wouldn't bother trying to do anything anti-exploit related on the client. Anything you can do there, a dedicated exploiter can do too. Verify everything server-side, and as the age-only mantra goes: NEVER TRUST THE CLIENT whenallthepigsfly 541 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

type

print(combinded) at the top of the key function

Ad

Answer this question