Setting a player's velocity to the opposite of their AimVector?

Hi facepunch.

I’ve been messing around with a swep for a while now, I essentially just want it to bounce you in the opposite direction to where you shot.

After toying with util.TraceLine and such, I’ve come to this point:

ply:SetVelocity( ply:GetAimVector():Rotate( Angle( 180, 0, 0 ) ) )

[ERROR] addons/bounce/lua/weapons/weapon_bounce/shared.lua:92: bad argument #1 to ‘SetVelocity’ (Vector expected, got no value)

  1. SetVelocity - [C]:-1
  2. unknown - addons/bounce/lua/weapons/weapon_bounce/shared.lua:92

Any help?

You can reverse vectors by multiplying them by -1.

Thanks a ton, ollie!