Humanoid:Move Problem (It makes character ascend)

Hello DevForum!
I’m trying to make an ability that makes your character charge forward and upon contact with anyone it launches an attack.
I’ve used BodyForce previously however it makes the character float if you jump while using it.
I tried BasePart:ApplyImpulse however it’s so confusing to use.
So I want to use Humanoid:Move however while using it moves my character forward but it also goes slightly upward making me fly.
How do I fix this? :,)

coroutine.wrap(function()
		while IsCharging == true and BV and Hitbox do
			Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
			Humanoid:Move(Humanoid.MoveDirection)
			wait()
		end
	end)()

Your character is “ascending” because you’re changing the humanoid state to jumping contently. For some strange reason :Move() never worked for me, so instead I get the position infront of the character and use :MoveTo().

The code sample below worked for me while testing.

coroutine.wrap(function()
	while IsCharging == true and BV and Hitbox do
		local MoveToPos = (RootPart.CFrame * CFrame.new(0,0,-2)).Position
		Humanoid:MoveTo(MoveToPos)
		wait()
	end
end)()

Hope this helps!

2 Likes

Bruh thanks for making me realize why I was still going up, thanks again for the help.

2 Likes

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