This allows the server to mitigate the lag of the player by moving back all the entities that can be lag compensated to the time the player attacked with his weapon.
This technique is most commonly used on things that hit other entities instantaneously, such as traces.
Lag compensation only works for players and entities that have been enabled with Entity:SetLagCompensated
Despite being defined shared, it can only be used server-side.
Do a crowbar-like melee trace, enabling lag compensation before doing so.