VectorForce help

Try applying velocity to your HumanoidRootPart, vectorforces doesn’t work completely alone.

1 Like

I thought .Velocity of a part was deprecated?

Make it applys it to center of mass, and give it more Velocity as the The Players Character is heavier than a standard part

1 Like

tried that, still does not work.

1 Like

Sorry, i meant the AssemblyLinearVelocity of it. (.Velocity still works but yeah you know.)

1 Like
-- example
local HRP = character.HumanoidRootPart
HRP.AssemblyLinearVelocity = Vector3.new(your choice here)
1 Like

So is AssemblyLinearVelocity the same as Velocity? I have not heard of it before

I think its basically a replacement for BasePart.Velocity.

Uses these 2 properties:
image

This made my character move upwards, however only for a short amount of time. How can I make it so that the force is always working? Also, does workspace gravity affect this. Thanks

Another thing is that the velocity changes after I change it? Why is this? https://gyazo.com/f12dbd772b0f4803796f8f5ee0f20b27

I think you can use BodyVelocity for that. (didn’t test this yet)

not so sure if this works just an idea

local bv = Instance.new("BodyVelocity")
bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bv.Velocity = HRP.CFrame.UpVector * 50 -- You can change the multiplicator value
bv.Parent = HRP

game.Debris:AddItem(bv, 1)

Glad to be able to help!

I’m using LinearVelocity, which is the same but it works, thank you very much!

Setting the Velocity properties (AssemblyLinearVelocity etc) is generally not recommended as it will only get applied for that once instant, then just get overwritten with whatever the current velocity happens to be. It also changes velocity in a non-physical way
In your clip the velocity changes right away because there’s still gravity, so you’ll move at (0,10,0) for one single frame, then gravity just takes back over and has you drop back to the floor.

Using a LinearVelocity constraint gives you a way to keep something moving at a constant velocity. Seems like that’s what you wanted and you’ve figured it out. You can lower the MaxForce on your LinearVelocity so that it takes longer to reach your target speed (but if it’s too low then it will never reach your target speed).
The only down side is if anything makes you go faster than your LinearVelocity’s target speed, then it will make you slow down to your target again. This behavior might be strange for something like a jetpack.

Using the VectorForce would still work, you really just needed a value higher than (0,500,0). And with this, the force just gets applied unconditionally. You’ll keep accelerating unless there’s another force to slow you down.

I have turned gravity off, so i still have this problem.

Oh you’re right. The Humanoid has additional forces acting on it that would also overwrite the velocity directly. Switching the Humaonid state to “Physics” should disable these forces. Still, it’s better to use a constraint to set velocity rather than setting it directly.

Thank you. Also, how would I do that?

EDIT: I figured it out, but when I turn this on it effectively completely stops my character. How can I make it so that the humanoid has no forces acting on it, but yet also my character to work normally?

You would need to switch to the Physics state when you want to use the jetpack, then switch back to Running or something when not using the jetpack

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