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)
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)
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.
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.