Any tips to reduce delay in server replicating as much as possible?

I’m trying to create a laser gun. Now i made it first in client it had little to no delay its almost perfect, but when i got to replicating it to the server it got complicated real quick. The delay is so bad. I made one script where the player moves before the beam in the server. and i made one where the beam moves first before the player.

The concept of the gun is basically just a beam coming out of the gun and doesn’t disappear until end of input and basically just changes properties as the player moves/ aim elsewhere.

its been bugging me for days on how to fix this issue any tips?

I’ve also been having this issue, have you found a fix?

unfortunately no i havent found anything yet.