You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
I am trying to create an antiexploit for the Tabglitching client issue, this is a bug where, upon holding right click on the window bar, freezes your game and character, making your character freeze midair whenever needed. -
What is the issue?
I have a popular PVP game where players hit each other off an island, and being able to float midair and prevent any damage done to you is a pretty big exploit and it is taken advantage of a lot. -
What solutions have you tried so far?
I have been trying to make an antiexploit for this for a while, and i thought of a solution where, when a player has a random lag spike, it sets their networkownership to the server so the server can handle physics and make them automatically fall. This doesnt seem to work however, and just makes you lag for a second or two.
local character = script.Parent
local player = game.Players:GetPlayerFromCharacter(character)
local humanoid = character:WaitForChild("Humanoid")
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local antiTabGlitch = coroutine.create(function()
while true do
local oldPosition = humanoidRootPart.Position
local oldVelocity = humanoidRootPart.Velocity
task.wait(1.5) -- Cooldown
local currentPosition = humanoidRootPart.Position
local currentVelocity = humanoidRootPart.Velocity
if oldPosition == currentPosition and oldVelocity ~= Vector3.new(0, 0, 0) and currentVelocity ~= Vector3.new(0, 0, 0) and tonumber(player:GetNetworkPing() * 2000) < 300 then
if character.Humanoid.Health == 0 then return end
local character = player.Character
-- Set network ownership of character baseparts to server
for _, part in ipairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.Anchored = false
part:SetNetworkOwner(nil)
end
end
print("start antitab")
-- Wait for 2 seconds
wait(2)
print("end antitab")
-- Bring network ownership back to client
for _, part in ipairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part:SetNetworkOwner(player)
end
end
end
end
end)
wait(5)
coroutine.resume(antiTabGlitch)
character.Humanoid.Died:Connect(function()
coroutine.close(antiTabGlitch)
end)
please help all you can, this is a big problem for my game.