So I’m trying to make a bullet that travels in the direction of where a player has shot their gun. Bullet is for visual purposes only.
Currently I’m in a bit of a pickle because I don’t know what is causing the bullet to just freeze for a split second then the bullet’s velocity gets applied after.
This is because of how server and client ownership works,
Whenever the server makes a projectile, it lags in place while waiting for itself to replicate to all clients before going forward. You can change how this works by setting the network owner of the projectile to the client who fired it using SetNetworkOwner(player) which would make it go forward instantly.
You might also need to change the AssemblyLinearVelocity on the client rather than server if it is still choppy, i dont really remember if it would replicate.
Edit: Also since you mentioned the bullet is just visual you could also make and move it on the client rather than the server which would also be instant.
This is likely because you’re moving the projectile on the server. The best way to go about projectiles is to handle all visuals on the client and then all hit detection on the server.