Part position is heavily async

While creating a weapon system for a game I’m working on I have encountered an issue that is leaving me scrambling the forums for an answer.

I’m using a projectile system using AssemblyLinearVelocity for its movement, when the projectile hits a part it will detonate. On the server this appears to work just fine, it detonates directly on the part, however on the client it appears much higher which looks plain awful. This screenshot is after I set the network owner of the projectile to the server, before I did the client would show it being much lower then it should be.

Not entirely sure, but you may consider using raycasting and tweening if the client-server synchronization of the physics engine is being troublesome.

Physics done on the server will always be off from the client. This is why when you set the Network owner to the client it appears better, as the client will be the one doing the calculations instead.

I recommend you either don’t use physics (raycasts like @electricpretzel0 said) or simply create a projectile for every player using RemoteEvents, creating the particles from the client and simply handling the backend physics on the Server.

implemented a separate script for the effects, worked very well

1 Like

We can use fastcast for physics.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.