i want to secure my remotes from exploiters firing them. but, how would i do that?
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