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

Can you give tips of anti cheat for character speed, jumping,etc?

I want something loopless as possible, and that the results of the check doesnt get interfered by other server scripts that mess with characters.

I thought of adding a humanoid.StateChanged event on a server script that sets the walkspeed, jumppower and collisiongroup to what I want to, so if an exploiter try something as soon as they move they are fixed, and, with discrepancies ocurring too often (position too far away from moments ago), kick him. Would that be a good way to do it?

2 comments

0

Um, the best "anti-cheat" currently is just Filtering Enabled. Like seriously.. unless you are a very advanced developer, you can't do any better.

1

Velocity checking

2 answers

✓ Accepted answer

Unfortunately, developing anti-cheats is always going to be a game of cat and mouse.

Sure, you can make all the scripts you want to try and stop it but if there's a will to get around it there's a way to get around it. The most useful server sided anti-cheat that I can think of is using Magnitude to check to make sure the player isn't moving too fast. Putting an anti-cheat on the client is basically useless, since the client can't be trusted whatsoever. I have a little experience with anti-cheats and bypassing them. Its surprisingly easy when its on the client because of how much control exploiters have.

The best thing I can recommend for you is to skip making an anti-cheat altogether and just focus on securing your code where you can make it secure. If exploiters can't get at your code to begin with, and you have a proper client-server model your game should be fine.

3 comments

0

woah nice answer and script!

0

The core scripts for the functionality are secure on serverscriptservice, only local scripts like a menu gui and inputs to fire remoteevents are clientside and i wouldnt car that much if they stole it. I was thinking of making it a bit like this, as i said, so i think i will just try it

0

Note that if you had the time and energy, you could implement a system that would be hard to bypass while doing something useful. Link: https://docs.unrealengine.com/en-US/Gameplay/Networking/CharacterMovementComponent/index.html

i worked up a script as a example. this script checks the speed and jump of a player if its changed, and if it is changed the players speed and jump is changed back. unfortunately i wasnt able to come up with the characters position thing to check if it the players position changed drastically like if they teleported. but heres the script anyway:

local character = script.Parent
local primaryPart = character.PrimaryPart
local humanoid = character:WaitForChild("Humanoid")


humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
	if humanoid.WalkSpeed ~= 16 then
		humanoid.WalkSpeed = 16
	end
end)
humanoid:GetPropertyChangedSignal("JumpPower"):Connect(function()
	if humanoid.JumpPower ~= 50 then
		humanoid.JumpPower = 50
	end
end)

hope this helped :)

6 comments

0

this is a local script inside of startercharacterscripts

0

this is gonna sound bad but this is a joke of an anticheat :/

0

hey it works, and if you have something better then why dont you answer the question and show us you script?

0

k

0

The hackers can still exploit it, by deleting the script. I think it should be on the server, but client changes to character properties dont replicate on the server, even if the results are made on it too (walkspeed dont change on server, but the server accepts that the player is moving at a ridiculous speed.

0

If you don't have an anticheat that can't be easily bypassed then don't post it

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