How do I smooth out the movement of new parts on the client?

When creating a new part with a high velocity, there is a noticeable pause when it first appears on the client, before jolting forward, and then continuing on as normal. However, on the server it is perfectly smooth:

I would like to know if there is a way to smooth out that jolt.

The important bit of code for creating the part looks like this:

local projectilePart = Instance.new("Part")
projectilePart.CanCollide = false
projectilePart:SetAttribute("owner",self.playerRecord.userId)
projectilePart.Shape = "Ball"
projectilePart.Size = Vector3.new(1,1,1)
projectilePart.Parent = workspace
projectilePart:SetNetworkOwner(nil)
projectilePart.Position = origin + vec * 1.25
projectilePart.AssemblyLinearVelocity = vec * self.rocketSpeed

I tried using CFraming instead Roblox’s physics to move the part, which removes the initial jolt but makes the rest of the projectile’s travel jittery.

2 Likes

When you instance a ‘projectile’ and add a force to it right off the bat, it will obviously stutter, or rather, have a small delay after you’ve applied the force. I’ve used this open source module called FastCastRedux.

It’s primarily used for weapons, but you can pretty much use it for anything. The module makes projectiles quite smooth and clean. And if you don’t want to use the module, you can always review the source code to see how the module does it. Hope this helps!

2 Likes