This question might have been asked and solved, but the problem is that the most anti fly scripts always are identifying in a time when they are not touching a floor. The problem is that I have some tools which let you fly or give you a high jump power, and those anti fly scripts could ban those players.
So the main question is how do I ban hackers when they are flying in some circumstances? (For example: tools, in-game flying script.)
The problem is I don’t know how to ban them in some circumstances, because the threads you were showing:
My game is R6
The script detects when the player has reached in a distance not allowed, which hurts a Minigame which teleports you very high, that Minigame might not work, that’s why I want the anti fly/tp system work in some circumstances.
Why don’t you just check if the player has one of those tools equipped that allow them to fly inside your fly detection script?
local FlyTools = {"FlyTool1, Flytool2"}
--inside loop
for i,v in pairs(FlyTools) do
if player.Character:FindFirstChild(v) then
break -- or return if you're relying on an event
end
end
I just want to say that you should ‘kill’ their character or punish them in some way but don’t ban them. Sometimes anti-cheat are bugged and it is going to be dreadful for you if your game gets huge and something causes the anti cheat to ban a lot of people wrongfully.
To answer the question, cast rays from the humanoidRootPart to the ground (nearest floor), if it has been above a certain height for a certain time, then do an action.
You can determine how fast they’re going when flying to see if they’re flying above the maximum speed the fly tool allows them to go I guess but I doubt exploiters would (assuming it’s a gamepass or currency tool) buy it just to fly hack.
You can check their position on certain axis’s and then use their next position a second later to calculate the amount of studs they’ve traveled which you then can compare to the maximum amount of studs you can go with the flying tool they have equipped (if they have one).
Can’t you just add a debounce to the fly detection whenever they’re being teleported? For example whenever they get teleported disable the fly check for them for X amount of seconds.