Getting some Errors, on some custom guns.


[ERROR] gamemodes/terrortown/entities/weapons/bow/shared.lua:188: attempt to call method 'GetViewModel' (a nil value)
1. unknown - gamemodes/terrortown/entities/weapons/bow/shared.lua:188

And here is a snippet of the code.


function SWEP:Holster()
	
	if CLIENT then
		local vm = self.Owner:GetViewModel()
		if IsValid(vm) then
			self:ResetBonePositions(vm)
		end
	end
	
	return true
end

Still can’t get it to work.

I assume this is to work off of SWEP Construct Kit? This is actually a really neat idea.


if CLIENT and IsValid(self.Owner) then
		local vm = self.Owner:GetViewModel()
		if IsValid(vm) then
			self:ResetBonePositions(vm)
		end
	end

Perhaps that?

I don’t think it works though. I still get the issues with the guns shrinking… And I just realized how stupid I am. I need to reset size >_>

gamemodes/terrortown/entities/weapons/bow/ But well, Thanks for your input, can’t test it today, Will test tomorrow .