Hi, I am making a gun and an issue I’ve run into is that when a player is moving, due to the latancy time between the server and client, the server and client see the gun’s barrel in different positions. I am trying to correct this.
My gun calls a remote event every time the player shoots. The client has its own mechanism for bullets that is distinct from the server. Both the client and server, however, use the barrel’s position to calculate the bullet trajectory, so the latency from the remote event causes the bullets to originate in different positions.
In the above GIF, blue bullets are from the server, and green bullets are from the client.
Is there any way to correct this issue without relying on the client to send its barrel position, while ensuring that bullet shots are smooth on the client? Thanks.