How would i make traveling bullets, and replicate them through clients?

I ask this because i wanted to have my bullets not just look like a ray.

But also unsure how to replicate the bullet, as its traveling i dont want the server and other clients having a unsync’d bullet

also not sure if this would be under scripting support but you cant really make this without scripting so

hopefully, I know what you are talking about. If I remember you can do something like “bullet:SetNetworkOwner(nil)”. But that only works if the bullets are actually physical I’m pretty sure.

My approach to this goal would be something like this:

Does the bullet travel by physics or script?
If it travels with some physics-involved constraints such as VectorForce, then you can apply a force by finding the direction between the bullet spawning point in a tool and the location/position targeted.
If it travels by using script through adjusting its position, the same thing, find the direction.

How do I replicate the bullet?
Replicating fired bullets can be simple and performant when done correctly, you should only render the bullet travelling only on the client side and not the server side. Using a remote event to signal bullet rendering from other clients can be useful. You could send information about the fired bullet so that the replicated bullet is identical to the information the fired bullet had on the client that fired the bullet.

i dont think ill need this but ill keep this in mind

it doesnt travel at all, which is one of the things i wanna figure out how to do

but dont know which of the 2 methods you stated are better, nor do i know how to do them.

for just a ray type bullet i would just send the start and end position to other clients and have them just create the bullet among those 2 points.

but for this would i need to constantly send information about the bullet? to update its position, ect. ?

also mb for the long reply i had to do some irl stuff

If the raycast is already completed, no, you don’t have to update the bullets position. You just have to have the client make it look pretty by creating some sort of bullet visual. All you need is the start and end position.

If you’re doing physics-based trajectory, that’s a different story.

Also I suggest to keep working on this and to make the bullet visuals on the client. It’s better for server health and reducing lag.