Velocity function not working on prop gun!

Note that the audio is not working either and so far no errors in console. I do not know what I’m doing wrong here, old code?


//Scripted by Battle Axe\\

//Information
SWEP.PrintName			= "Ballshooter"
SWEP.Author				= "BattleAxe"
SWEP.Instructions		= "Left click to shoot balls!"
SWEP.Category			= "The Prop Gun"
 
//Spawning information
SWEP.Spawnable	= true
SWEP.AdminOnly	= true

//Primary
SWEP.Primary.Clipsize			= -1
SWEP.Primary.DefaultClip		= -1
SWEP.Primary.Automatic			= false
SWEP.Primary.Ammo				= "none"

//Secondary
SWEP.Secondary.Clipsize			= -1
SWEP.Secondary.DefaultClip		= -1
SWEP.Secondary.Automatic		= false
SWEP.Secondary.Ammo				= "none"

//Variables
SWEP.Weight						= 5
SWEP.AutoSwitchTo				= false
SWEP.AutoSwitchFrom				= false

SWEP.Slot						= 3
SWEP.SlotPos					= 2
SWEP.DrawAmmo					= false
SWEP.DrawCrosshair				= true

//Models
SWEP.ViewModel					="models/weapons/v_shotgun.mdl"
SWEP.WorldModel					="models/weapons/w_shotgun.mdl"

//Precache sounds
local PrimaryAttack 			= Sound( "Weapon_Shotgun.Single" )
local SecondaryAttack 			= Sound( "Metal.SawbladeStick" )



//Prop Code
function SWEP:PrimaryAttack()
		self:ThrowBall( "models/Combine_Helicopter/helicopter_bomb01.mdl" )
		self:EmitSound( "PrimaryAttack" )

end

function SWEP:SecondaryAttack()
		self:ThrowBall( "models/props_junk/sawblade001a.mdl" )
		self:EmitSound( "SecondaryAttack" )
		
end

function SWEP:Reload()
		self:ThrowBall( "models/props_junk/watermelon01.mdl" )
		
end

function SWEP:ThrowBall( model_file )
		if ( CLIENT ) then return end
		
		local ent = ents.Create( "prop_physics" )
		
		if ( !IsValid(ent) ) then return end
		
		ent:SetModel( model_file )
		
		ent:SetPos( self.Owner:EyePos() + ( self.Owner:GetAimVector() * 32 ) )
		ent:SetAngles( self.Owner:EyeAngles() )
		ent:Spawn()
		
		
		local phys = ent:GetPhysicsObject()
		if ( !IsValid( phys ) ) then ent:Remove() return end
		
		
		local velocity = self.Owner:GetAimVector()
		velocity = velocity * 500
		velocity = velocity + ( VectorRand() * 10 )
		phys:ApplyForceCenter( velocity )
		
		cleanup.Add( self.Owner, "props", ent )
		
		undo.Create( "Thrown_Ball" )
			undo.AddEntity( ent )
			undo.SetPlayer( self.Owner )
		undo.Finish()
end