Bullet duplication isn't fast enough

When I shoot a bullet, it takes too long to go from server back to client to create the bullet, so by the time bullet has come out, my characters already changed where it’s looking

Hard to record when I click, but the bullet is being created about 0.5 second after I have already clicked.

How can I get this to be instant, while still creating the bullets on all the other clients?

Laggy cannons would explain it, the replication is often delayed and requires technical approach on both server and client.

https://developer.roblox.com/en-us/articles/Fighting-Against-Lag

Try visually create the bullets on client while the server manages its hit detections. Additionally, fire to all clients to replicate the fired bullet.

1 Like

If I use Network Ownership, would it work? If not, please tell me why.

Adding on to this, you’ll inevitably experience the person who fired the cannon seeing the effect twice. To prevent this simply use an in pairs loop and iterate between all the players in-game, then proceed to fire the remote to all the clients except the original player.

It doesn’t change it, because the bullet is not physics-based. It is most likely using raycasting and CFrame methods.

@v7zr That’s exactly what was intended to avoid the “double tap” issue if you fire to all clients, filtering the original user.

1 Like

So something like this?

for _, v in pairs(Players:GetPlayers()) do
	if v ~= player then
		BulletFired:FireClient(v, weapon, start, target, speed, drop, TeamColor)
	end
end

And then on the client, when I fire the bullet, it creates it for me straight away, then fires to the server, server does checks, then fires to all the clients (but my own client)

2 Likes