Hi, I am making a combat system, and it’s pretty annoying to combo midair if you keep falling. So I want to make the character stay midair while comboing .
I’ve tried using the good ol’ Body Velocity but it keeps being replaced by the original body velocity that’s meant to move the player a bit when attacking
Here’s how i try to create the body velocity, please tell me if you need the whole script
local bv = Instance.new("BodyVelocity", data.Character.HumanoidRootPart)
bv.Velocity = data.Character.HumanoidRootPart.CFrame.LookVector * 10
bv.MaxForce = Vector3.new(99999, 99999, 99999)
bv.Name = "Velocity"
game.Debris:AddItem(bv, .2)
local ag = Instance.new("BodyVelocity", data.Target.HumanoidRootPart)
ag.Velocity = data.Character.HumanoidRootPart.CFrame.LookVector * 10
ag.MaxForce = Vector3.new(99999, 99999, 99999)
ag.Name = "Velocity"
game.Debris:AddItem(ag, .2)
local bv = Instance.new("BodyVelocity", data.Character.HumanoidRootPart)
bv.Velocity = CFrame.new(0,0,0)
bv.MaxForce = Vector3.new(99999, 99999, 99999)
bv.Name = "AntiGravity"
bv.P = 9000
game.Debris:AddItem(bv, 1)
local ag= Instance.new("BodyVelocity", data.Target.HumanoidRootPart)
ag.Velocity = CFrame.new(0,0,0)
ag.MaxForce = Vector3.new(99999, 99999, 99999)
ag.Name = "AntiGravity"
ag.P = 9000
game.Debris:AddItem(ag, 1)
I also tried to override the velocity of the pre-made body velocity, it kinda works except for the fact that it still falls after a split second. It also overrides the forward movement of other hits.
local bv = Instance.new("BodyVelocity", data.Character.HumanoidRootPart)
bv.Velocity = data.Character.HumanoidRootPart.CFrame.LookVector * 10
bv.MaxForce = Vector3.new(99999, 99999, 99999)
bv.Name = "Velocity"
game.Debris:AddItem(bv, 1.2)
local bv2 = Instance.new("BodyVelocity", data.Target.HumanoidRootPart)
bv2.Velocity = data.Character.HumanoidRootPart.CFrame.LookVector * 10
bv2.MaxForce = Vector3.new(99999, 99999, 99999)
bv2.Name = "Velocity"
game.Debris:AddItem(bv2, 1.2)
wait(.2)
bv.Velocity = Vector3.New(0,0,0)
bv2.Velocity = Vector3.New(0,0,0)