Help with a rocket's velocity

Hey!
I have this script here…

local floatForce = Instance.new("BodyForce")
	floatForce.force = Vector3.new(0, (Rocket:GetMass() + AddParticle(Rocket):GetMass()) * 196.1, 0.0)
floatForce.Parent = Rocket
	local Direction = PositionSend - Handle.Part.Position
	Rocket.Velocity = Direction		
	Reload()

But I have an issue with it.
When the rocket is being fired, its lifetime will always be around 1-2 seconds, that means if I’m firing the rocket to a close position the rocket’s speed will slow down, and if I shoot it to a far location the rocket’s speed will go higher.

I want the rocket to have the same speed at all times… How can I do that?

You can normalize Direction with Vector3.Unit, which retains the direction of the vector while giving it a magnitude of 1, and multiply it by an arbitrary speed constant.

Rocket.Velocity = Direction.Unit * Speed
1 Like