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

How can I confirm values passed through remote event ?

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.

2 comments

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

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

1 answer

type

print(combinded) at the top of the key function

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