Fire and reload for Alyx's Gun

Hello, I made ​​an Alyx’s Gun for my PR, but I am having some problems when I made ​​a cade, I see not just the hands and the weapon, I should certainly wrong somewhere. But I can not, therefore, someone could esque me to sort the main and reload please? I just want it to be a automatic pistol but I do not want you see the viewfinder. Here is the code with the Wmodel and Vmodel:

Could someone do this to me please? Thank you!

Sorry please clean your code and sort it.

This looks very useless …




self.BuildViewModelBones = function( s )
if LocalPlayer():GetActiveWeapon() == self and self.ViewModelBonescales then
for k, v in pairs( self.ViewModelBonescales ) do
local bone = s:LookupBone(k)
if (!bone) then continue end
local m = s:GetBoneMatrix(bone)
if (!m) then continue end
m:Scale(v)
s:SetBoneMatrix(bone, m)
end
end
end

end

end


???





if CLIENT then
self:RemoveModels()
end

end


if CLIENT then
///...



That looks like C&P

If I clean up these codes the weapon don’t work, it’s not useless, I have tried to remove them, but that don’t work.

Can someone help me please? Thanks!