Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I make my shell ejected bullets more smooth?

Asked by 4 years ago

https://gyazo.com/293d0654f45186e22fb648f471895fa1

This is what it looks like when I play single player, it looks decent, not too smooth but pretty decent; but when people start to join, the bullets start lagging pretty hard.

Is there a solution to fix this lag that affects my bullets? Thanks.

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

That little 'hop' where the bullets seem to freeze is almost definitely the network ownership of the bullets switching from the client to the server. You can read more about network ownership on the Wiki, but as the bullet moves far away enough from the player, the game automatically changes its ownership from client -> server (in fact I think it has this exact example because it's a common problem). The solution is to set the network ownership (to the server) yourself before moving the bullet. That's as simple as:

bulletPart:SetNetworkOwner(nil)

This will stop the network ownership changing, hopefully preventing that pause in its flight

0
https://gyazo.com/8d9786563d27507a727d0d628d3d1a16 That solution made the bullet lag more worse. Thanks for trying though. iinaoriku 52 — 4y
Ad

Answer this question