How do I redirect the player's velocity into another direction?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want to redirect the player’s velocity into a certain direction. Basically, I want to launch the player into a certain direction but at the same speed that they were moving at.

  1. What is the issue? Include screenshots / videos if possible!

I don’t know the calculations for it.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve tried looking for solutions, but all I found was how to launch the player into a certain direction at a specific velocity. I want to launch the player into a certain direction at the SAME velocity, not a different one.

Use ApplyImpule but with the HRP velocity,

local direction = ... --// Unit vector btw

local rootPart = character.HumanoidRootPart
local force = 10 * rootPart.AssemblyMass

rootPart:ApplyImpulse(rootPart.AssemblyLinearVelocity * direction * force)

ok well that wouldn’t work because the mass of the character is not specifically 10

Well, OP could just multiply the force with the AssemblyMass

they said they don’t know the calculations so at least provide them with the correct one

Jeez relax, it was just an oversight

1 Like

Is there any way to do this with rootpart.Velocity?

It’s deprecated but ye smth like this should work

rootPart.Velocity = rootPart.AssemblyLinearVelocity * direction * force

So, I’m trying to make a vault function that holds your speed and moves the player in the LookVector of their rootpart. I tried the code above, but this happens. Any idea how I can fix this? I can send the vault code if you need.

You have StreamingEnabled turned on, just go to workspace properties, scroll down and uncheck the StreamingEnabled box

I figured out how to make the vault work, but thank you for helping!

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