Help with anti fly scripts

I recently decided to continue development on my anti-cheat. I have some modules that still work today. The only module that does not work is the anti fly module.

This is the anti fly module I am using. It is in a local script.

HumanoidRootPart.ChildAdded:Connect(function(Obj)
	if Obj:IsA("BodyPosition") or Obj:IsA("BodyVelocity") or Obj:IsA("BodyGyro") then
		Obj:Destroy()
		game.ReplicatedStorage["Door(UNUSED)"]:FireServer("fly")
		LocalPlayer:Kick('\n \n You automatically kicked for: \n \n "Exploiting (Flyhacking)" \n \n You can contact the game creator if you think this is a false kick!')
	end
end)

When I add a BodyGyro to my HumanoidRootPart nothing happens!

Do not make anti-exploits in local scripts. Exploiters can easily disable these.

It is also possible that you cannot kick using a localScript. Try using remote events, though, if you put everything into a server script then you won’t need any remote events.

The localscript is double secured. Do you know any tutorials on making a serverside anti cheat? I do not have expirience in doing these.

I don’t know any, but for the anti-fly one, you could try using raycasting to find whether a player doesn’t have anything under them for too long. You could make a new thread for each player, or loop through each player in one thread, to do the raycasting.

Thank you! I appreciate your help.

1 Like