Good Anti Cheat for an Obby

Hello, I’m currently working on an Obby and the issue is that it is easily exploitable

I have tried a lot of ways to create an anti cheat, sometimes they don’t work and when they do work they kick the player for Teleports, dashing moves or just falling from the map. (I have Teleports and dashes in the game)

My goal is to detect Flying, Speed and Noclip

Any ideas?

1 Like

Maybe do some out-of-bounds zone or something. Or if a player reaches a checkpoint to fast them it kicks them or something. This is an odd question because obbies don’t usually have anti-cheat systems, because it’s an Obby.

I’ve got a couple of vague ideas;

Prevent Noclipping:
If there’s a maze or something, add ‘Blank Areas’. These are just large filled spots with absolutely nothing inside them (Like a plain wooden block).
But, inside, you can add a part that if a noclipper happens to touch it, sends a signal and kicks them.

Prevent Flying:
Like @xXTheRealCamelXx said, an Out of bounds zone is a great idea. Make a sort of invisible ‘Box’ around your obby which triggers a signal and kicks the exploiter

Prevent Speeding:
You could use a script that every once in a while checks a player’s walkspeed. Since exploits are on the client, and this script sends a signal to the client and receives the inputs, the exploiter’s speed change would be detected by the server’s “Normal” speed of 16, and would automatically kick the exploiter.

Preventing Repeat Exploiters:
Instead of instantly kicking them, I’d say ‘tag’ the exploiter. Essentially what this means is you add a sort of ‘exploiter’ tag onto them, which makes sure the server DOES NOT save (and wipe) their progress when they leave.
This is better since exploiters won’t even know that they’ve been spotted until they rejoin.
A master plan for those scandals!

Hopefully this helps! :]

1 Like

Bro you can just ask chatGPT and it will give you good solutions

1 Like

Only ask ChatGPT if you absolutely need too, because it seems lazy if your entire game is AI generated code and solutions.

1 Like

Yes! A server wide speed limit is a great idea! If a player goes beyond a certain speed then it marks them for a first offense and kicks them. And second, third offense, etc.

You do know that exploiter can fake out the received value

2 Likes

would just like to add on to this and clarify a crucial detail; do not read the value from the Humanoid to determine this. The WalkSpeed would be modified on the client, yes, and this means the property change won’t replicate to the server. But, since clients have network ownership of their character, the change would still take effect, so the server would read the normal WalkSpeed but the player would still be going at the speed they set their WalkSpeed to. Instead, use the formula speed = distance / time to calculate a rough estimate for the walkspeed and work with that instead.


(@SaleMales just beat me to this point lol)
If you’re sending signals to the client and expecting a result from said client, don’t. Exploiters can easily manipulate the values the server receives (through methods like hooking), and if you use a RemoteFunction they can yield server threads indefinitely.

Just a reminder that this is a BASIC SYSTEM which should be tweaked and implemented alongside a larger complex anticheat.

2 Likes

For speed you could do some checks like

local OldPosition = CFrame.new(0, 0, 0)
local HRP_Position = Character.PrimaryPart.Position
local NewPosition = CFrame.new(HRP_Position.X, 0, HRP_Position.Z) --\\ Don't take Y since they may be falling
local Distance = (NewPosition.Position - OldPosition.Position).Magnitude

if Distance >= (Character.Humanoid.WalkSpeed + 3) then
      Character:PivotTo(OldPosition)
      return
end
OldPosition = NewPosition

And check this every second or so (Heartbeat loop with delta time I guess)

You could also implement anti-noclip in there by raycasting from old position to new position and checking if there is a wall or something like that (Must add ignoring other players and other stuff)

You could also use Chickynoid since it is server authoritative and there is no movement exploits, but it’s kind of hard to implement and doesn’t supports some needed things

2 Likes

Most useful reply on the devforum be like:

1 Like

Good Evening @adam365656 :sun_with_face:

None of the replies above are solutions that I would personally consider a “Good Anti Cheat” for an Obby.

I will give you a good anti cheat for an obby.

Let me explain.

No. Your goal is to make a good anti cheat and you won’t do that through detecting any of those 3 things. You see those 3 things represent one key factor. Time. More specifically… Saving Time.

You see exploiters are masterminds of finding ways to save time so that they can beat the game faster than everyone else.

What you need to do instead of trying to catch them in their act of speeding through the obby is you need to validate that they reached each checkpoint in the obby.

So for example… if they reach checkpoint 1… they should not be able to reach checkpoint 3 or 4 or 5 etc.

This needs to be validated from the server side.

You also need to learn how to track their time from the server side and you need to validate exactly when they started the obby and track it all the way to the very end of the obby when they finish.

You need to set a reasonable amount of time that a fast player could actually beat the obby in… this is where having testers can be extremely helpful because if you even just have one person who is really good at obbies they can tell you around how long it would take to complete at their absolute fastest.

If you don’t have testers… a backup method you can do by yourself is run through the obby with invincibility so that you cannot take damage by any of the damage parts… and from there you can see how long it would take to complete at a fast speed.

With this robust system in place… you should not face any further issues with cheaters.

It will always be possible for exploiters to cheat… and detections on a molecular level are quite useless… because this will actually force them to beat the obby within reasonable time frames.

It will defeat the purpose of them cheating the obby because they won’t gain any significant anything in your game that other players can’t get themselves just from playing it legitimately.

I am sure if any exploiters read my message… it will annoy the heck out of them :wink:

I hope this helps :slight_smile:

I don’t think the Server will pick up on WalkSpeed being changed.

The Server ignores everything the Client does. The only way the Server knows what the Client is doing is through a RemoteEvent.

To know where their character is, you can weld a part to the Character’s HumanoidRootPart. Just keep it outside the actual Character (so the Client does not gain control of it).

You can use the clone/weld part to track the Character’s position. There are a lot of speed check scripts on the forum and on YouTube you can check out for how to track their speed.

1 Like

The thing you told them to do basically is useless and just useless spending of the time

Honestly I think this is kind of smart because most detections are inaccurate or sometimes don’t work…but idk

1 Like

I tried Chatgpt but it was really dumb and I didn’t learn/understand anything so not a good idea.

1 Like

I’ve found it simple but effective, just make it where the player needs to go from level to level in order. If they skip one then it resets them to the original level.

1 Like

Yes that’s what I put in my explanation. Thank you so much for your input. I am really happy that I’m not the only person who sees this as a great way to do it.

There is a small issue with this, in my game when the character spawns it spawns on the Roblox default spawn and then teleports to the spawn point (this happens normally and not done by scripting) so the anti cheat flags that and teleports the player to the Roblox default spawn and the player dies and it repeats all over again.

1 Like