Dash Not doing the Right thing

I’m doing a movement system and I’ve come up with a little bit and it had me confused for a while,
every time i dash and jump and like do a little flick, the dash just goes too far away and I’m not sure why its happening, I’m using linear velocity

glitching part

normal one

The Script
		local linear = Instance.new("LinearVelocity", char.HumanoidRootPart)
		local attachment = Instance.new("Attachment", char.HumanoidRootPart)

		attachment.WorldCFrame = char.HumanoidRootPart.CFrame
		linear.VelocityConstraintMode = Enum.VelocityConstraintMode.Line
		linear.Attachment0 = attachment
		linear.MaxForce = math.huge
		linear.LineVelocity = 70
		
		
		if uis:IsKeyDown(Enum.KeyCode.W) then
			h:LoadAnimation(Animations.Dashes.Forward):Play()
			runService.Stepped:Connect(function()
				linear.LineDirection = char.HumanoidRootPart.CFrame.LookVector
			end)
		elseif uis:IsKeyDown(Enum.KeyCode.D) then
			h:LoadAnimation(Animations.Dashes.Right):Play()
			runService.Stepped:Connect(function()
				linear.LineDirection = char.HumanoidRootPart.CFrame.RightVector
			end)
		elseif uis:IsKeyDown(Enum.KeyCode.A) then
			h:LoadAnimation(Animations.Dashes.Left):Play()
			runService.Stepped:Connect(function()
				linear.LineDirection = char.HumanoidRootPart.CFrame.RightVector * -1
			end)
		elseif uis:IsKeyDown(Enum.KeyCode.S) then
			h:LoadAnimation(Animations.Dashes.Behind):Play()
			runService.Stepped:Connect(function()
				linear.LineDirection = char.HumanoidRootPart.CFrame.LookVector * -1
			end)
		end
		
		game.Debris:AddItem(linear,0.3)
		game.Debris:AddItem(attachment,0.3)```
1 Like

I think it may be related to some weird physics, like the player is not grounded so he doesn’t get slown down by anything

The only thing i think may work is maybe reducing the MaxForce but i’m not certain

Also it’s looking amazing that’s some nice animation quality

1 Like

Have you tried using “Body Velocity”? and maybe since the character is doing something like a flick ROBLOX thinks your not on the floor anymore interfering with the hip-height.

i tried reducing the “MaxForce” but still same issue.

i did use “BodyVelocity” Before but still both of them have the same issue.

Try an animation that does not do a flip. maybe a dive or something, If not please may i view your script for the last issue I’m looking for.


and the script is already on the main text

Ok, i think the dashing to far you’ve just got to decrease the debris time. I’ve never really encountered problems with dashing, so this is quite new to me.

This is definitely related to Roblox’s physics. I had this issue, I’m pretty sure VectorForce fixes that.

do you mean like i have to replace the “linear Velocity” with the “VectorForce”? or do i add it with it?

The Script
		local force = Instance.new("VectorForce", char.HumanoidRootPart)
		local attachment = Instance.new("Attachment", char.HumanoidRootPart)
		
		force.Attachment0 = attachment
		force.RelativeTo = Enum.ActuatorRelativeTo.World
		force.ApplyAtCenterOfMass = true
		
		--[[linear.VelocityConstraintMode = Enum.VelocityConstraintMode.Line
		linear.Attachment0 = attachment
		linear.MaxForce = math.huge
		linear.LineVelocity = 70]]
		
		
		if uis:IsKeyDown(Enum.KeyCode.W) then
			h:LoadAnimation(Animations.Dashes.Forward):Play()
			runService.Stepped:Connect(function()
				--linear.LineDirection = char.HumanoidRootPart.CFrame.LookVector
				force.Force = char.HumanoidRootPart.CFrame.LookVector * 10000
			end)
		elseif uis:IsKeyDown(Enum.KeyCode.D) then
			h:LoadAnimation(Animations.Dashes.Right):Play()
			runService.Stepped:Connect(function()
				--linear.LineDirection = char.HumanoidRootPart.CFrame.RightVector
			end)
		elseif uis:IsKeyDown(Enum.KeyCode.A) then
			h:LoadAnimation(Animations.Dashes.Left):Play()
			runService.Stepped:Connect(function()
				--linear.LineDirection = char.HumanoidRootPart.CFrame.RightVector * -1
			end)
		elseif uis:IsKeyDown(Enum.KeyCode.S) then
			h:LoadAnimation(Animations.Dashes.Behind):Play()
			runService.Stepped:Connect(function()
				--linear.LineDirection = char.HumanoidRootPart.CFrame.LookVector * -1
			end)
		end
		
		--	game.Debris:AddItem(linear,0.3)
		game.Debris:AddItem(force, 0.3)
		game.Debris:AddItem(attachment,0.3) ```

I’m Not Sure if this is the right way to use it because it’s my first time using it.

Maybe you could change the max force to something smaller than math.huge, 70 for example?

The “VectorForce” Doesn’t Have MaxForce

I’m talking about when you’re using Linear Velocity

yeah i even tried that on the linear velocity

Try and play around with the collisions while the player is dashing