LinearForce.LineDirection can't be changed if VelocityConstraintMode is set to Attatchment0 or Attatchment1

I’m trying to create a dash force that moves the character in the direction they’re moving, but changes direction if they rotate their character during the dash.
To do this, I create a LinearForce with a Line VelocityConstraintMode and RelativeTo set to Attatchment0. When the force is being turned on, its LineDirection is set to the move direction of the character. However, unless RelativeTo is set to World, LineDirection seems to not change from its default value (a Vector3 of direction (1, 0, 0).)

-- initializing the LinearForce
local dashAttachment ="Attachment", chr.HumanoidRootPart)
local dashForce ="LinearVelocity", dashAttachment)
dashForce.MaxForce = 0
dashForce.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
dashForce.VelocityConstraintMode = Enum.VelocityConstraintMode.Line
dashForce.Attachment0 = dashAttachment
dashForce.LineVelocity = 80
-- later on when it's being activated
dashForce.LineDirection = hum.MoveDirection 
print(dashForce.LineDirection) -- always outputs 1, 0, 0 no matter what hum.MoveDirection is unless RelativeTo is set to World
1 Like