So I made an anti-hack script that bans players from a game if they have too much walkspeed:
local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer repeat wait() until LocalPlayer.Character while true do wait() if LocalPlayer.Character.Humanoid.WalkSpeed ~= 16 then LocalPlayer:Kick("Exploiting") wait(10) end end
But, I forgot that I had a sprint function in-game, so when I tried team-testing, it kicked me and my friend from the server. How can I unban my friend and I from our own game?
If I know correctly, (I am assuming that you are using sprint, or moving fast/ btw jumping is not always 16 walk speed) That what you could do instead of the hacking you could check if the player name is yours or your friends.
local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer repeat wait() until LocalPlayer.Character while true do wait() if LocalPlayer.Character.Humanoid.WalkSpeed ~= 16 then if LocalPlayer.Name ~= "Lightning_Game27" then --you can change the name to anyone. LocalPlayer:Kick("Exploiting") wait(10) end end end
If that doesn't work maybe you need to change game settings such as jumping/falling.
I believe that you haven't banned yourself based on the script, you can just remove this Kick Player and Problem Solved?