I posted this problem before and my solution was to use LinearVelocity, but in this case I can’t use that so I need another solution. The issue I’m having is that when I jump in the middle of the boost I go super far. However when I use it on the ground I only go forward a little bit (Friction or whatever). Anyways I can have the boost stay consistent in air, on ground, and mid jump? Using VectorForce.
if Char.HumanoidRootPart:FindFirstChild("AppliedBoost") then
Char.HumanoidRootPart:FindFirstChild("AppliedBoost"):Destroy()
end
local VF = Instance.new("VectorForce")
VF.Name = "AppliedBoost"
VF.Attachment0 = Char.HumanoidRootPart.RootAttachment
VF.ApplyAtCenterOfMass = true
VF.RelativeTo = Enum.ActuatorRelativeTo.World
VF.Force = Char.HumanoidRootPart.CFrame.LookVector * 25000
VF.Parent = Char.HumanoidRootPart
game.Debris:AddItem(VF, TableCheck.DurationAmount)
If you need a consistent distance regardless of whether the player is on ground or mid-air, consider using AlignPosition instead.
Otherwise, I recommend using LinearVelocity instead as it allows you to essentially lock the Y axis by setting the MaxAxesForce with Vector3.new(x, math.huge, z).
It still has issues if you are on the floor, but you can probably get away by checking if the Humanoid.FloorMaterial ~= Enum.Material.Air and shift them up a little before dashing.