LinearVelocity teleporting players up walls

Title. I’ve tried using MaxAxesForce and setting the Y to 0, but that didn’t work. Lower amounts for X and Z will cause the dash to not go far enough. Seems to only happen when dashing while jumping.

Streamable link

Velocity settings:

    velocity.Attachment0 = attachment
	velocity.Name = "DodgeVelocity"
	game.Debris:AddItem(velocity, 0.25 * AgilityMultiplier) -- In the video example, its 0.25 * 1
	velocity.VelocityConstraintMode = Enum.VelocityConstraintMode.Vector
	velocity.VectorVelocity = Vector3.new(X * Velocity, 0, Z * Velocity) -- X & Z are the camera's lookvector or rightvector, depending on dash direction
	velocity.ForceLimitsEnabled = true
	velocity.ForceLimitMode = Enum.ForceLimitMode.PerAxis
	velocity.MaxAxesForce = Vector3.new(100000, 0, 100000)

This might be a hard solution, but you can shoot a raycast from the Character to the wall, if the player is too close, destroy the linearVelocity.

Solved, it was code unrelated to the linearvelocity causing the teleporting