BodyVelocity is not working for high ping players

Here’s the video of me punching the high ping player.
With the last attack he should fly away but it doesn’t happen.

And here’s the video of him punching me. ( I had good ping.)

Is there any way to prevent this??

Code

This is server sided.

--If character got hit:
local parent --someone who got hit.
local bv = Instance.new("BodyVelocity", parent.HumanoidRootPart)
bv.MaxForce = Vector3.new(1,1,1)*100000
bv.Velocity = -parent.HumanoidRootPart.CFrame.LookVector*50+Vector3.new(0,20,0)
game.Debris:AddItem(bv,.5)

How exactly are you handling the BodyVelocity? Are these lines of code performed on the server:

--If character got hit:
local parent --someone who got hit.
local bv = Instance.new("BodyVelocity", parent.HumanoidRootPart)
bv.MaxForce = Vector3.new(1,1,1)*100000
bv.Velocity = -parent.HumanoidRootPart.CFrame.LookVector*50+Vector3.new(0,20,0)
game.Debris:AddItem(bv,.5)

or the client that intends to be flung by the BodyVelocity?

This is only a theory but, if you are handling the BodyVelocity on the client that is intended to be flung through remotes, there is probably a rather huge delay in doing so.

I’m creating BodyVelocity on server side.

It’s even worse now.////////
///

Are the hits registering?

It might be that the hits aren’t registering and therefore your flung effect isn’t firing?

They register, but when ping is high they really not…

I use .Touched

Are you doing hit detection on the client or server?

Also if they sometimes aren’t registering than wouldn’t that be the issue?

I also personally have a game that flings people using BodyVelocity which I have had 0 reports of players not flung. Not entirely sure what’s going on there, but perhaps you could try removing NetworkOwnership on the HumanoidRootPart then possibly adding it back? I’m not 100% sure if switching NetworkOwnership continuously is a smart move, I’m not entirely sure at this point sorry.

Yes I’m doing hit detection on server

Just making sure.

Try putting a print right before you create the BodyVelocity and right after you add it to debris. Just want to know if its even running and/or being added to the players rootpart. If its not running altogether than its most likely how your hit detection is setup.

Try out this amazing module by swordphin123. It should be able to help you create a better hit detection system.

No worries!!

Goodluck with the rework but I highly suggest looking into the post I linked as it might be very helpful!

1 Like