Weird client/server LinearVelocity interaction?

I am using linear velocity to “dash” my character forward for his ability, but this happens:

As you can see, this is the same interaction with 2 different perspectives. I want both players to see a smooth dash rather than a teleport. I’m not really looking for an answer to my problem, more just an explanation of why this is happening.

Here is the code that dashes the character forward (serverscript)

spawn(function()	--move forward
			local bv = Instance.new("LinearVelocity",Humrp)
			local attach = Instance.new("Attachment",Humrp)
			bv.Attachment0 = attach
			attach.Axis = Vector3.new(0,0,-90)
			bv.VelocityConstraintMode = Enum.VelocityConstraintMode.Line
			bv.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
			bv.MaxForce = math.huge
			bv.LineDirection = Humrp.CFrame.LookVector
			bv.LineVelocity = 100
			wait(.2)
			bv:Destroy()
			attach:Destroy()
		end)

I would appreciate any help :smiley:

2 Likes

you could try to use a BodyPosition instead of LinearVelocity

This person is having a similar experience:
LinearVelocity does not replicate - Help and Feedback / Scripting Support - DevForum | Roblox
I think it’s a bug now.

Thanks all for the responses. For anyone reading this, I fixed it by putting the “move forward” function in a local script. It replicates to other clients better than the server can.

1 Like

I came across this post after having pretty much the same issue.
I was initially having linearvelocity parented to the primarypart which for some unfortunate reason is the head by default. when I parented everything to the humanoidrootpart instead the mover started working properly again.

I don’t exactly know why this is happening but check and see if your parenting any movers to the head and see if changing that to the humanoid root part does anything.

Nope, it’s not a bug. Ignore my previous post.

LinearVelocity does some stuff in the task scheduler to make it run in parallel, thus delaying replication (well, this is just my theory). Not sure why the head works differently from the HumanoidRootPart though.

can you show me the detail what did you do to fix that ? Thanks