I’ve looked at this post here and have tried the solution, but friction still seems to be an issue! (albeit not as much)
I’m also using BodyVelocity
which I would like to avoid using as it’s deprecated, but I don’t know any other much viable options! others I have tried I’ve struggled to get working or were overkill/not my taste : /
-- Services
local uis = game:GetService("UserInputService")
local plrs = game:GetService("Players")
local debris = game:GetService("Debris")
-- Objects
local plr = plrs.LocalPlayer
local chr = plr.Character or plr.CharacterAdded:Wait()
local hum = chr:FindFirstChildOfClass("Humanoid")
local root = chr:WaitForChild("HumanoidRootPart"):: BasePart
-- Values
local isDashing = false
local dashSpeed = 125
local mxf = Vector3.new(100000, 0, 100000)
uis.InputBegan:Connect(function(input, gameProcessed)
if input.KeyCode == Enum.KeyCode.Q and not gameProcessed then
if not isDashing then
isDashing = true
local dir: Vector3
if hum.MoveDirection ~= Vector3.zero then
dir = hum.MoveDirection
else
dir = root.CFrame.LookVector
end
local str = (dir * Vector3.new(1, 0, 1)).Unit * dashSpeed
local velocity = Instance.new("BodyVelocity")
velocity.Parent = root
velocity.P = 1250
velocity.MaxForce = mxf
velocity.Velocity = str
debris:AddItem(velocity,.1)
task.wait(.1)
isDashing = false
end
end
end)
fyi it’s local!