Dash boost not working as well on the ground than on air

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.

Have you already tried using a linear velocity, if you want it to only move in the horizontal or vertical direction use maxAxesForce, another alternative would be to use the Character controllers, in it you can put a ground controller that would be able to control the friction, however they are more complex and you would have to create a script to control them, and if other scripts use the character’s standard movement, it would disfigure everything, so I think the option The simplest thing would actually be to just use a linear velocity
if you want to use linear velocity or character controllers:
Character Controllers
How to use controllers
LinearVelocity Documentation

Have you tried ApplyImpulse

i got it working ty

character limit

1 Like