I was testing a simple feature with server authority: Make the character jump very high when Q is pressed, with a cooldown of 2 seconds.
In doing so, I noticed my client script would incorrectly revert the time of the last jump after a rollback, and would allow the player to attempt a jump within less than 2 seconds, causing a major miss-prediction. This was even more noticeable on a Public Server.
So I decided to put the Rollback code inside of BindToSimulation instead of RunService.Rollback, by comparing the time of the current simulation with the previous one. If it decreased, then the rollback code would run. This worked perfectly and the miss-prediction issue was gone.
Comparing the times of Rollback on BindToSimulation and RunService.Rollback, I noticed a difference of around 0.5 seconds on studio and up to 2 seconds on a public server.
See below a video of my character pushing a ball (which causes miss-predictions), with the console printing the times of Rollback gotten from RunService.Rollback and BindToSimulation respectively
Rollback times on public server
Link to public place and a place file:
Game
Rollback Error.rbxl (67.4 KB)
The game has a README file on ReplicatedStorage that explains how to switch the jump system from BindToSimulation to RunService.Rollback rollbacks. Try spamming the Q key on and moving the ball on both, you should notice the RunService.Rollback version will allow you to jump when you shouldn’t, after a rollback.
A private message is associated with this bug report