Weird lag spike?

Hi guys,

So I made a spear that is anchored when its flying. When it hits an unanchored object it gets welded to that object. However, whenever it hits someone’s boat, it causes the boat to lag a bit (this lag is only visible to the player who threw the spear).

As you can see in the video below, the boat sort of stops for a second. I think this is happening because of network ownership switching, but I’m not sure. How can I fix this?
https://gyazo.com/696c926a139e211c33dd08d4f60c7426

2 Likes

Do you weld the object locally or one the server?

Try setting the network ownership again for the newly welded parts, as welded parts can affect network ownership. My guess is the spear is network owned by the player throwing it, which causes problems when welded.

Yes its welded locally because the spear projectile is created locally. The server doesn’t see any spear projectiles. All are rendered locally on each client.

I tried setting the network ownership of the spear to the same owner as the boat, but that didn’t solve the issue. Also the spear is anchored when flying, so nobody has network ownership over it until its unanchored and welded to the boat. And the boat is always owned by the driver.

are you setting unanchored first or welding first then unanchored?

Welding first, then unanchoring

try that in reverse unanchor and weld right after

1 Like

Ayeee that worked, thanks a lot!

1 Like