Trying to make a dash system that doesn’t only function as transportation from point A to B

Hello. I am trying to script a decent dashing system. So far I have tried 3 different methods, BodyVelocity, BodyPosition and LinearVelocity. I abandoned the BodyVelocity one due to it being deprecated. Anyways, what I need is not making character go from point A to B like BodyPosition and LinearVelocity (as far as I observed) does. I want the player to be able to change where they are going while dashing by moving where their character is looking at. So like when they open shiftlock and dash to right side, if they move their mouse then the character will start going to the new right position. Any ideas?

I was told that it is possible with LinearVelocity however my version doesn’t work. Here’s the script. How should I adjust it?

	elseif dashSide == "Right Dash" then
		print("dash right")
		db = true
		dashing.Value = true
		canDash.Value = false
		canRun.Value = false
		
		local totalCharMass = character.HumanoidRootPart.AssemblyMass

		local linearVelocity = Instance.new("LinearVelocity")
		linearVelocity.VelocityConstraintMode = Enum.VelocityConstraintMode.Line
		linearVelocity.MaxForce = math.huge
		linearVelocity.LineDirection = character.HumanoidRootPart.CFrame.RightVector
		linearVelocity.LineVelocity = 100
		linearVelocity.Attachment0 = character.HumanoidRootPart:FindFirstChildOfClass('Attachment')
		linearVelocity.Parent = character.HumanoidRootPart
		game.Debris:AddItem(linearVelocity, 0.5)
		
		wait(1)
		canRun.Value = true
		dashing.Value = false

		wait(2)
		db = false
		canDash.Value = true
	end
2 Likes

i do that using body position, how i do it is each time the humanoid’s walk direction changes, the end point of the body position changes too

1 Like

How exactly do you achieve that?

1 Like

1 Like

I know it’s a bit late but what I do is putting where you apply velocity in a repeat loop, so if the direction is Left, the loop will make the velocity keep applying to the left of the character, making it go how you’d like to

1 Like