RollbackHitbox
An open-source library that makes shooting feel fair online, without trusting the player's computer.
- Open Source
- Real-time Systems
- Multiplayer Networking
- Game Development
- Lua
In an online shooter, what you see is always slightly out of date. Aim at someone moving and your shot arrives after they have already moved on — so you miss a shot that looked perfect.
The fix is to rewind: when a shot arrives, the server reconstructs where everyone was when the player pulled the trigger, and judges the shot against that. This library does that for Roblox, and it is published for anyone to use.
How it works
The server records everyone's position about 60 times a second into a fixed-size ring that holds roughly the last 400 milliseconds. When a shot comes in, it finds the two recorded moments either side of the shot's timestamp and blends between them, so accuracy does not depend on the shot landing exactly on a recorded frame.
Nothing is physically moved during this. The check is pure math against the rewound positions, so rewinding one player's shot never disturbs anyone else's game.
What it protects against — and what it does not
The README states both, deliberately.
It stops shots being credited from impossible positions, stops rewind timestamps being manipulated (they are clamped to a maximum), and decides headshots on the server rather than believing the client.
It does not stop a client fabricating where it was aiming, and it is not an aimbot detector. Saying so is more useful than implying it covers everything.
Published properly
Installable three ways — package manager, a downloadable model file, or dropped straight into a project — with a full API reference. It was extracted from a real game rather than written as a demo.