BodyVelocity Delay

There is a bug where when i apply body velocity it will lag behind for every player except the one that has it applied to them (also happened with Impuse, and 3 other velocity things i tried) here is my code

local vel = Instance.new("BodyVelocity", Character.HumanoidRootPart)
	vel.MaxForce = Vector3.new(1,1,1) * 1000000
	vel.Parent = Character.HumanoidRootPart
	vel.Name = "SmallMoveVel"
	vel.Velocity = Vector3.new(1,1,1) * Direction * VelocityNUM + Vector3.new(0,Upwardsvalue,0)

	if Rotation then
		local rot = Instance.new("BodyAngularVelocity")
		rot.MaxTorque = Vector3.new(1,1,1) * 1000000
		task.delay(0.05, function()
			rot.AngularVelocity = Vector3.new(1,1,1) * Direction * 10
		end)	
		rot.Parent = Character.HumanoidRootPart
		rot.Name = "SmallMoveRot"
		task.delay(Duration/2, function()
			rot:Destroy()
		end)
	end
	task.delay(Duration, function()
		vel:Destroy()
	end)

Things ive tried (Networkownership: HUGE security flaws, lags for every player except the attacker)
Tweening CFrame (not good for the system i have)
client sided knockback (same results as the video)

Heres the video: Watch 2024-05-07 22-26-36 | Streamable (expires in 2 days)

anyway if you guys have a better way then bodyvelocity it would be much appreciated!

I’m not sure if it will help or not, but you seem to parent the velocity as soon as it is created.
Parent the velocity only after it’s been configured (force and velocity set)

local vel = Instance.new("BodyVelocity", Character.HumanoidRootPart)
--Remove the Character.HumanoidRootPart portion.

Try removing the second parameter and see if that changes anything.

	local vel = Instance.new("BodyVelocity")
	vel.MaxForce = Vector3.new(1,1,1) * 1000000
	vel.Name = "SmallMoveVel"
	vel.Velocity = Vector3.new(1,1,1) * Direction * VelocityNUM + Vector3.new(0,Upwardsvalue,0)
	vel.Parent = Character.HumanoidRootPart

	if Rotation then
		local rot = Instance.new("BodyAngularVelocity")
		rot.MaxTorque = Vector3.new(1,1,1) * 1000000
		task.delay(0.05, function()
			rot.AngularVelocity = Vector3.new(1,1,1) * Direction * 10
		end)	
		rot.Parent = Character.HumanoidRootPart
		rot.Name = "SmallMoveRot"
		task.delay(Duration/2, function()
			rot:Destroy()
		end)
	end
	task.delay(Duration, function()
		vel:Destroy()
	end)

It still seems to be acting exactly the same, thanks though.

This is because of Network Ownership, when you use BodyVelocity, on the client you have no delay, but on the server you do.

Also, bodyvelocity is deprecated so that might also be part of the issue. Maybe try using linearvelocity.

Please read the full post, i have already stated that i have tried network ownership

it does the same thing for impulse, linear velocity, and just setting the root parts velocity.

Yes, but linear velocity is the new version of bodyvelocity. They may be similiar but using linear could be different as it does get updated, whereas body is still the old body velocity it always was.

I know this, i will eventually transfer to linear velocity, but it has the same issues. That’s what needs fixing.

Yeah not sure what the delay is if you’ve used networkownership + client-sided. Only possible explanation could be that the velocity is too high that the client/server is finding it hard to process. It’s unlikely but I don’t see anything else that could possibly be causing a delay. But, maybe try lowering the velocity if you can and see what happens. ORRRR you can try using coroutine/task library functions such as task.spawn or coroutine.wrap so the thread resumes immediately. Like REAAAALY fast.

So i just played 10 fighting games, and it seems delay is inevitable. The thing that those games do to make it less noticeable is enable ragdoll after the velocity is set.

Yeah alot of games have that little delay, so accept it boi.

Yes, and im saying that the delay is caused by Network Ownership, if you want it in simpler terms, you can’t do anything about it.