local M={}for D,e in pairs(gunmodel:GetDescendants())do if e:IsA("\066\097\115\101\080\097\114\116")then table.insert(M,e)end end function guntransparency(D)for M,e in pairs(M)do e.LocalTransparencyModifier=D end end function modeltransparency(M,D)for M,e in pairs(M:GetDescendants())do if e:IsA("\066\097\115\101\080\097\114\116")then e.LocalTransparencyModifier=D end end end

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
