# Vector3Force Velocity Speed

is there a way to make vector3 forces faster while keeping it’s distance?

i have a shove mechanic and when you shove somebody, it’s meant to throw them back a little bit, but to keep it realistic they shouldn’t be slowly moving backwards.
Here is the function it runs off of:

``````local function Shove(target, attacker)

local VectorForce = Instance.new("VectorForce", target)
local Attachment = Instance.new("Attachment", target)

local direction = (target.Position - attacker.Position).Unit

print("LV, and Attachment have been isntanced")

VectorForce.Attachment0 = Attachment
VectorForce.Force = (direction).Unit * 2000 -- This is what changes the force, it either makes you FLING back, at the cost of the recieving character unrealistically flying backwards off of the map, or simply going backwards but extremely slowly, which is not what i want to do
VectorForce.RelativeTo = Enum.ActuatorRelativeTo.World

print("The instances now have properties.")

print("Deleting items")
end
``````

I just want the movement to be faster without affecting the actual distance.

Try a higher Force, and decrease the Debris timer.

1 Like

Why are you getting the unit of your Vector3 values twice? You first get the unit when you define the direction variable, and then you get the unit again while setting the force.

1 Like

If i could give two comments a solution I would, both helped.

I don’t know why I added two .units, but I guess it was making the movement alot slower, all I did was remove the .unit while defining the force and it’s faster while also covering a more realistic amount of ground, thanks

1 Like

All the .Unit property of Vector3 does is give you the corresponding unit vector. This essentially means the direction of the vector. It’s normalized, meaning it has a magnitude of 1. So calling .Unit twice does nothing. It is merely an optimization to remove that second call, it had no effect on the end result. Hope you understand this property better now.

1 Like

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