Climbing SWep

weapons\climb_swep\shared.lua:46: attempt to call method ‘SetVelocity’ (a nil value)

Line 46 = self.Owner:SetVelocity(Vector(0,0,300-Vel.z))


SWEP.Author = "Meoowe"
SWEP.Contact = ""
SWEP.Purpose = ""
SWEP.Instructions = "Use primary fire to climb."

SWEP.Spawnable = true
SWEP.AdminSpawnable = true

SWEP.ViewModel = "models/weapons/v_hands.mdl"
SWEP.WorldModel = ""

SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = true
SWEP.Primary.Ammo = "none"

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

SWEP.Delay = 0.3

// Reload

function SWEP:Reload()
end

// Think

function SWEP:Think()
end

// PrimaryAttack

function SWEP:PrimaryAttack()
	local pos = self.Owner:GetShootPos()
	local ang = self.Owner:GetAimVector()
	local tracedata = {}
	tracedata.start = pos
	tracedata.endpos = pos+(ang*25)
	tracedata.filter = self.Owner
	local trace = util.TraceLine(tracedata)
	if ( trace.HitWorld or trace.Entity:IsValid() ) then
	    local Vel = self.Owner:GetVelocity()
		self.Owner:SetVelocity(Vector(0,0,300-Vel.z))
	end
	self.Weapon:SetNextPrimaryFire( CurTime() + self.Delay )
end

// SecondaryAttack

function SWEP:SecondaryAttack()
end