Linear Velocity Issue

I’m currently trying to make it so when you activate an ability, you dash for a set duration. However, through my friends I’ve learned that if you rapidly spin your camera in a circle and hold jump you can go extremely far.

This is what’s intended.

This is what happens…??

I’m not really sure what to do.

                local originalTimer = .8
		local dashLengthTimer = originalTimer
		local bodyVelocity = Instance.new("LinearVelocity")
		bodyVelocity.Name = "WarriorAB1Dash"
		bodyVelocity.Parent = character
		bodyVelocity.Attachment0 = humanoidRootPart.RootAttachment
		bodyVelocity.MaxForce = math.huge
		bodyVelocity.VelocityConstraintMode = "Line"
		
		dashLength = RunService.Heartbeat:Connect(function(dt)
			dashLengthTimer -= dt
			bodyVelocity.LineDirection = humanoidRootPart.CFrame.LookVector * Vector3.new(1, 0, 1)
			bodyVelocity.LineVelocity = 50
			if dashLengthTimer <= originalTimer - .3 and ab1Combo == 1 then -- Original - Delay before you can nuse ALT AB1
				ab1Combo = 2
			end
			if ab1Combo == 2 then
				player.PlayerGui.SkillGui.Frame.Skills.AB1.TextLabel.Text = "!!!"
			end
			if dashLengthTimer <= 0 then -- ends naturally
				animations[4]:Stop()
				bodyVelocity:Destroy()
				ab1Combo = 1
				actionable -= 1
				putOnCooldown("AB1", 4)
				dashLength:Disconnect()
			end	

Thank you for any help

1 Like

Why are you using LinearVelocity and not VectorForce?

I don’t know what VectorForce is, this is the first time I’m hearing of it actually

Should def lower the max force to like 50000 or something like that

1 Like

just use assemblylinearvelocity smh

nvm thats irrelevant to your use case mb

Vectorforce IS what I’m looking for for consistency, but do you have anywhere to point to fixing the speed difference between being on ground and in air? I’m looking into that now but I can’t find any solution that works for me

Using AssemblyLinearVelocity kinda works as well but i can’t jump or fall with gravity anymore which isn’t what I want.

change max force to something like 100k