How do i synchronize a bullet on a moving target

So i am trying to make a gun system but ran into an issue

Let’s say person 1 fires a bullet at person 2 (who is moving). From person 1’s POV, they shot directly on person 2. But from person 2’s POV, since movement is handled by their client and is therefore ahead of what other people can see, the bullet is replicated behind them. The image shows it below (the red X is the bullet position)

What I am trying to do is this, where the bullet correctly replicates directly on to person 2.

The bullets are hitscan, not a projectile. Any idea how to fix this? I couldn’t find any topics about this

1 Like

Stupid idea but… bullets, when replicated to person 2’s client, are relative to their character in accordance to where they were on person 1’s perspective when firing. however, this brings on needing to do math for every player in the server when a bullet is fired.
Another idea could be to have bullets hit relative to the part they intercepted, but if the interceptor was not part of person 2’s character, the bullets would appear to lag behind, even if they were missed.