Giving ammo on weapon spawn

I’m trying to give ammo on weapon spawn as ti doesn’t seem to work with the weapons I’m using. I have this in my SWEP but it errors.



function SWEP:Initialize()
	if SERVER then
		self.Owner:GiveAmmo(90,self.Primary.Ammo)
	end
end


Gives


attempt to call method 'GiveAmmo' (a nil value)

Yet I can run on the server I’m on !l me:GiveAmmo(num,“ammotype”) and it works fine.

Any ideas why this isn’t working?

If I remember correctly, self.Owner isn’t set in SWEP:Initialize on server, only a frame after that. ( So, a 0 (zero) second timer will do )

Figured a delay would fix it but wasn’t sure. Thanks for the help.