How can I stop a LinearVelocity from messing with my character's orientation?

Currently trying to create a proper dash mechanic for a game, however I am terrible with constraints. I have set up the dash so that it works, however it likes to slightly rotate the character for a second whenever it gets enabled, which gets much more pronounced if the dash is a long one. This is especially a problem when you dash on the ground:

Since I have like, never used these before I’m not quite sure what the problem is - the creator documentation isn’t super clear about a lot of things regarding these constraints too. Here is the script that is controlling all dash logic:


local ContextActionService = game:GetService("ContextActionService")
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")

local player = Players.LocalPlayer
-- Since this is a StarterCharacterScript the character will always be the correct one
local character = player.Character
local rootPart = character:FindFirstChild("HumanoidRootPart")
local humanoid = character:FindFirstChildOfClass("Humanoid")


-- Create the proper LinearVelocity
local attatchment0 ="Attachment")
local attatchment1 = attatchment0:Clone()

attatchment0.Parent = rootPart
attatchment1.Parent = rootPart

local linearVelocity ="LinearVelocity")
linearVelocity.Attachment0 = attatchment0
linearVelocity.Attachment1 = attatchment1
linearVelocity.MaxForce = math.huge
linearVelocity.RelativeTo = Enum.ActuatorRelativeTo.World
linearVelocity.VectorVelocity =
linearVelocity.Enabled = false -- Set to true only when performing a move!! If set to true then the player cannot move on their own accord!

linearVelocity.Parent = rootPart

-- Function definitions for moveset
local ACTION_DASH = "Dash"
local DASH_KEYBIND = Enum.KeyCode.LeftShift
local DASH_DISTANCE = 100
local DASH_TIME = 0.1
local DASH_COOLDOWN = 0.5

local dashVelocity = DASH_DISTANCE / DASH_TIME

local dashDebounce = false
local dashReset = true
local lastDash = 0

local function dash(_, InputState: Enum.UserInputState, InputObject: InputObject)
    -- is the debounce active?
    -- is the UIS the correct one?
    if dashDebounce 
    or InputState ~= Enum.UserInputState.Begin then 

    -- cooldown
    local timeOfRequest = tick()
    local delta = timeOfRequest - lastDash
    if delta < DASH_COOLDOWN then

    -- if in the air, only dash once
    if humanoid.FloorMaterial == Enum.Material.Air then
        if not dashReset then

        dashReset = false

    dashDebounce = true

    lastDash = tick()
    local oldVelocity = rootPart.AssemblyLinearVelocity

    local dashDirection = if humanoid.MoveDirection ~= then humanoid.MoveDirection else rootPart.CFrame.LookVector
    dashDirection =, 0, dashDirection.Z).Unit

    linearVelocity.VectorVelocity = dashDirection * dashVelocity
    linearVelocity.Enabled = true


    linearVelocity.Enabled = false
    -- No Y velocity so things like jumps aren't maintained
    rootPart.AssemblyLinearVelocity =, 0, oldVelocity.Z)

    dashDebounce = false

-- Register base moveset (may be changed by other abilities)
ContextActionService:BindAction(ACTION_DASH, dash, true, DASH_KEYBIND)

-- Connections
humanoid.StateChanged:Connect(function(_, newState: Enum.HumanoidStateType)
    if newState == Enum.HumanoidStateType.Landed then
        -- reset any once-in-air abilities
        dashReset = true

-- Unregister base moveset on death to not clog up ContextActionService

Linear velocity in vector velocity mode applies the force at the attachment point.

You could try to put the attachment at the Center of mass using rootPart.CenterOfMass

Or you can use plane constraint mode to make Linear Velocity only work on the XZ plane (left right forwards backwards, but not up and down).

I was lead to believe that setting the parent of an attachment would also put it at the centre of mass?

This would work, however I want the dash to have no movement on the Y-Axis, so having it only work on XZ would cause the player to start falling mid-dash. I’ll try manually setting the position of the attachment.

Manually setting the position to rootPart.CenterOfMass yields the same results

If not you can also try the other modes like Line mode.

Would Line mode not have the same issue where the character is free to move on any other axis?

Maybe you should try it first, theres no documentation on how these modes work in detail as of the moment.

According to the guy he said it could work:

Maybe use line mode of linear velocity to control the y axis and plane mode to control the XZ axis.

Yeah, I tried it, still has issues with the character going silly mode or whatever

It looks like changing the MaxForce fixes that problem??? I really do not understand these constraints lol