function boost()
local character = game.Players.LocalPlayer.Character
if not character then return end
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if not humanoidRootPart then return end
local distance = (workspace.CurrentCamera.CFrame.Position - workspace.CurrentCamera.Focus.Position).Magnitude
local isFirstPerson = distance <= 0.75
local UsingPart = isFirstPerson and character:FindFirstChild("viewmodel"):FindFirstChild("Head") or humanoidRootPart
local speed = humanoidRootPart.AssemblyLinearVelocity.Magnitude
local acceleration = math.clamp(speed, 100, 1000000)
-- Get the direction the player is looking (includes vertical aiming)
local boostDirection = UsingPart.CFrame.LookVector
-- Apply velocity in that direction
humanoidRootPart.AssemblyLinearVelocity = boostDirection * acceleration
end
This script make the character boost where they are looking at. When I use the move on ground it’s stiff and clipped than normal distance on air.
I already know this is because of the friction and I have tried most methods from different posts but none helped.