--gun parts

local gunparts = {}

for i,v in pairs(gunmodel:GetDescendants()) do
	if v:IsA("BasePart") then
		table.insert(gunparts, v)
	end
end

function guntransparency(tr)
	for i,v in pairs(gunparts) do --looping through an already made table alone is faster than getdescendants and then looping
		v.LocalTransparencyModifier = tr
	end
end

function modeltransparency(m, tr) -- this is for stuff like fps mags
	for i,v in pairs(m:GetDescendants()) do
		if v:IsA("BasePart") then
			v.LocalTransparencyModifier = tr
		end
	end
end
