How do i prevent exploiters from doing this?

So basically I have an elevator that only calls from one button which is above (or lete say second level) and once you go below (or in first level/inside elevator), you can’t call it again unless somebody else does it for you from above (second level) this works for normal players but exploiters can easily call/press the button then tp back (this is the anti-tp doing its function) is there to a prevent them for doing that? I’m sure it makes it is 100% anti-false positives considering normal players can’t do it by normal chance.
SUMMARY:
I have an elevator that only calls from above and to go back you need somebody else to call from above for you, exploiters can do this by themselves by tping.
I was thinking of adding a stringvalue that contains every username of players in below first level and if they somehow call the elevator while still having a stringvalue containing their username, they get kicked from server.

You’re going to have to post (some of) the code for us to understand a) what is exactly going on in your code and b) find any weak points where exploiters could mess with it

I don’t think code is necessary since the only thing the button is does tween the elevator ‘floor’ and closing appropriate doors.

Like I said you CANNOT call the elevator from first level since it’s broken and the only way to call it is from second level and have somebody else do it for you, but exploiters can do this by teleporting and triggering the button.

Sanity checks would be required of course. Maybe you could store a table of all players in the current level serversided, which is similar to what you suggested with a string value.

I assume you have an event that brings them to a certain level, so whenever that’s fired, insert the player into a table with table.insert . On the contrary, when the event that brings them up is fired, remove all the players in the table (or whoever is brought up) with table.remove.

Whenever someone presses that button to bring people up, you can use table.find and then check if they’re in that table, if they are then you know they’re exploiting and it’s not possible for that to occur under your proposed system.

Other than like, an anti cheat which detects teleports in general, I think that’s one of your only options.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.