Help with LinearVelocity

Yes. I have not tried applying force to the Y axis.

Give both ideas a shot, and see where you land. If you havenā€™t tried something that might work, thereā€™s no harm in an attempt. :smile:

What am I supposed to do with the Y axis?

if humanoid.FloorMaterial == Enum.Material.Air then
				linearVelocity.LineDirection = Vector3.new(humanoid.MoveDirection.X,0,humanoid.MoveDirection.Z)
			else
				linearVelocity.LineDirection = humanoid.MoveDirection
			end

Oh wait, I figured it out! The attachment was the problem.


kinda works
I moved the attachment infront of the player.

Set LinearVelocity.LineDirection to Vector3.new(humanoid.MoveDirection.X,Humanoid.MoveDirection.Y,humanoid.MoveDirection.Z)

Also, Iā€™m glad to see you got it working better. Keep working at it and eventually youā€™ll be able to perfect it!

Jump is disabled so MoveDirection.Y would be 0.

1 Like

I actually fixed it! (just removed a couple lines and it worked!)

if humanoid.FloorMaterial == Enum.Material.Air then
				linearVelocity.LineDirection = humanoid.MoveDirection
				linearVelocity.LineVelocity = humanoid.WalkSpeed
				linearVelocity.Enabled = true
			else
				linearVelocity.LineDirection = Vector3.new(0,0,0)
				linearVelocity.LineVelocity = 0
				linearVelocity.Enabled = false
			end
			
			if humanoid.MoveDirection == Vector3.new(0,0,0) then
				linearVelocity.LineDirection = Vector3.new(0,0,0)
				linearVelocity.LineVelocity = 0
				linearVelocity.Enabled = false
			end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.