Make entity fly like a missile

So I’m trying to make a missile but I can’t get this code to work. I copied the code from the GMod thruster code.



function ENT:Initialize()
 self:SetModel("models/props_phx/ww2bomb.mdl")
	self:PhysicsInit(SOLID_VPHYSICS)
	self:SetMoveType(MOVETYPE_VPHYSICS)
	self:SetSolid(SOLID_VPHYSICS)
  local max = self:OBBMaxs()
  local phys = self:GetPhysicsObject()
  phys:Wake()

  self.ThrustOffset = Vector( 0, 0, max.z )

  Get the data in worldspace
	local ThrusterWorldPos = phys:LocalToWorld( self.ThrustOffset )
	local ThrusterWorldForce = phys:LocalToWorldVector( self.ThrustOffset * -1 )

	Calculate the velocity
	ThrusterWorldForce = ThrusterWorldForce * 50000 * 1 * 50
	self.ForceLinear, self.ForceAngle = phys:CalculateVelocityOffset( ThrusterWorldForce, ThrusterWorldPos )
	self.ForceLinear = phys:WorldToLocalVector( self.ForceLinear )
  self:StartMotionController()
end

function ENT:PhysicsSimulate( phys, deltatime )

	local ForceAngle, ForceLinear = self.ForceAngle, self.ForceLinear
	return ForceAngle, ForceLinear, SIM_LOCAL_ACCELERATION

end


Any ideas why this doesn’t work?