Make everything non-transparent except a specific model

for _, v in pairs(ViewModel.RightArm:GetDescendants()) do
					if v:IsA("BasePart") then
						v.Transparency = 0
					elseif v.Name == "Base" then
						v.Base.Transparency = 0.3
						return
					elseif v.Name == "Handle" then
						v.Base.Transparency = 1
						return
					end
				end

I have a script here that makes everything non-transparent except Base and Handle inside the rightarm of the viewmodel. How can I achieve this? Please help me

Try this:

for _, v in pairs(ViewModel.RightArm:GetDescendants()) do
					if v.Name == "Base" then
						v.Base.Transparency = 0.3
					elseif v.Name == "Handle" then
						v.Base.Transparency = 1
                    elseif v:IsA("BasePart") then
						v.Transparency = 0
					end
				end
1 Like