Putting Humanoid.MoveDirection in a VectorForce

I want the VectorForce to push the player in the direction of the player movement. Read somewhere that movedirection is a vector3 and not CFrame so i need to convert it into a CFrame, it might be something else but i tried it here in the script and it didnt work:

local vForce = Instance.new("VectorForce")
vForce.Parent = hmdrootpart
vForce.Attachment0 = rootAttachment
vForce.Force = Vector3.new(CFrame.new(hmd.MoveDirection * 1000))
game.Debris:AddItem(vForce, 0.2)

VectorForce.Force and Humanoid.MoveDirection are both Vector3s. I don’t know what could be confusing about that. But, what do you need this VectorForce for?

1 Like

pushing the player toward the direction they’re moving in

As @bluebxrrybot explained there is no need to do any conversion so just remove it.

Also if you dont notice movement try increasing the force.

vForce.Force = hmd.MoveDirection * 1000

1 Like

Can’t you just increase the WalkSpeed of the player?

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