Transparency is not a valid member of model error

I am trying to make a tycoon game, but I ran into an error that I cant figure out.

for i, v in pairs(tycoon.Upgraders:GetDescendants()) do
if v.ClassName == “Part” or “WedgePart” then
v.Transparency = 1
v.CanCollide = false
end
end

This is what is inside the upgraders folder

for i, v in pairs(tycoon.Upgraders:GetDescendants()) do
if v:IsA("BasePart") then
v.Transparency = 1
v.CanCollide = false
end
end
3 Likes

dude just someone can fix this script

local function hideChat(boolean)
	print(boolean)
	for i,v in pairs(script.Parent.Parent:GetDescendants()) do
		if v.Name ~= "msg" and v.Parent ~= nil and v.Parent.Name ~= "msg" then
			print(v)
			local datav = folder_dataTransparency[table.find(folder_dataTransparency,v)]
			if v.Transparency == nil then -- there is the problem he said there is no transparency
			else
				if boolean then
					tweenColor(v,{Transparency = 1},.5)
				else
					tweenColor(v,{Transparency = datav.Transparency},.2)
					cooldown = disableScript
				end
			end
			if v.BackgroundTransparency == nil then
				else
				if boolean then
					tweenColor(v,{BackgroundTransparency = 1},.5)
				else
					tweenColor(v,{BackgroundTransparency = datav.BackgroundTransparency},.2)
					cooldown = disableScript
				end
			end
		end
	end
end

this script should be on gui like in trying do gui chat i want do if player is afk its should hide