Hello. I need some help on a little exploiter problem I have on my friend's group's game. There is this certain nuke that you need to enter the code for in order to arm the nukes. When ever you click on the code part, a GUI with a code pops up and it works, but when you get it correct it fires a remote event telling the server that it was the right code. Any exploiter can do this without even entering any code and it will be past the code stage. Then they can just pull the lever thus activating the nuke. Is there any solutions to this problem?
Here's the code for the event being fired:
function onEvent(player)
model.CodeActivated.Value = true
end

6 comments
Edited to re-correct the title.
idea: create a ObjectValue and set it to the script that fires the remote. In the receiver, check if the value is the same as the sender.
On server-side check whether the player is on the "code stage".
You need checks on both the client and server to make sure there was actually a code entered.
Guys, stop posting answers in the comments.
Sorry for the late reponse. These ideas are good, I will consider using them. Thank you!