Detecting TweenService Teleportation

I have had a recent exploit-hub made for my game which has been a mess to deal with. I have been able to counter normal teleportation exploits, but now they have resorted to tweening themselves to locations for advantages or tools.

Is there anyway to detect when a player is using a tweenservice teleport?

Detecting the magnitude between their last position and current position has been proven to not work that well anymore as it looks like normal movement on the server due to the smoothness of tweenservice.

These could work:

  • Try checking if they collide with something along the tween
  • Try seeing where they are now from like 2 seconds ago (Might not work if they go slowly enough)
local players = game.Players
local tolerance = 20 -- Set this to a low amount, just high enough to be unreachable in normal play (this is the distance before trigger)

local function checkMovement(plr)
	while true do
		local origCFrame = plr.Character:WaitForChild("HumanoidRootPart").CFrame
		wait(.1)
		local newCFrame = plr.Character:WaitForChild("HumanoidRootPart").CFrame
		print("Distance = " .. (origCFrame.p - newCFrame.p).Magnitude)
		if (origCFrame.p - newCFrame.p).Magnitude > tolerance then
			plr.Character:WaitForChild("HumanoidRootPart").CFrame = origCFrame
		end
	end
end

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local plrcoroutine = coroutine.create(checkMovement(plr))
		wait(1)
		coroutine.resume(plrcoroutine)
	end)
end)