I am making a gun in my game and the first issue I found was that the remote event caused too much of a delay. I read that you can get around this delay by running it on the client so I spawned the bullet in a local script. This fixed the delay but it created problems:
I can’t set the network ownership since it was cloned from a local script
Other players can’t see the bullet
I can’t make the bullet detect hits because it was cloned from a local script
I really don’t want to use Raycasting because I would like to have the effect of the bullet moving. I would really appreciate any advice or help.
I just checked out the gun and it works fine while standing still but once you start running it shoots from where you were standing a second ago. Here is an old video that kind of explains what I’m talking about.
I believe that is because of that the server cannot keep up with your current position and your old position is when you clicked. The one downside about the gun that I sent you is that you damage yourself if it hits you.
That gun model and the gun models I’m having issues with have to go from client > server > client using remote events and that causes a delay since it has to wait for the server to respond. The gun script I made now only runs on the client so there is no delay.
Yes just have the client render it instantly then fire a remote event to other clients to render the bullet as well. That is what all shooter games with smooth projectile movement do on roblox.