function autoSwitchFlaps()if flaps.Value.Value==true then if wings.Value.Value==true then local x=flaps_flex:GetChildren()local k=flaps_straight:GetChildren()for k=1,#x,1 do x[k].Transparency=0 end for x=1,#k,1 do k[x].Transparency=1 end elseif wings.Value.Value==false then local x=flaps_flex:GetChildren()local k=flaps_straight:GetChildren()for k=1,#x,1 do x[k].Transparency=1 end for x=1,#k,1 do k[x].Transparency=0 end end end end function autoSwitchGear()if gears.Value.Value==true then if wings.Value.Value==true then local x=gears_flex:GetChildren()local k=gears_straight:GetChildren()for k=1,#x,1 do x[k].Transparency=0 end for x=1,#k,1 do k[x].Transparency=1 end elseif wings.Value.Value==false then local x=gears_flex:GetChildren()local k=gears_straight:GetChildren()for k=1,#x,1 do x[k].Transparency=1 end for x=1,#k,1 do k[x].Transparency=0 end end end end wings.Value.Changed:connect(autoSwitchFlaps)wings.Value.Changed:connect(autoSwitchGear)
--AUTO

function autoSwitchFlaps()
	if flaps.Value.Value == true then
		if wings.Value.Value == true then
			local c = flaps_flex:GetChildren()
			local d = flaps_straight:GetChildren()
			for i = 1, #c do
				c[i].Transparency = 0
			end
			for i = 1, #d do
				d[i].Transparency = 1
			end
		elseif wings.Value.Value == false then
			local c = flaps_flex:GetChildren()
			local d = flaps_straight:GetChildren()
			for i = 1, #c do
				c[i].Transparency = 1
			end
			for i = 1, #d do
				d[i].Transparency = 0
			end
		end
	end
end

function autoSwitchGear()
	if gears.Value.Value == true then
		if wings.Value.Value == true then
			local c = gears_flex:GetChildren()
			local d = gears_straight:GetChildren()
			for i = 1, #c do
				c[i].Transparency = 0
			end
			for i = 1, #d do
				d[i].Transparency = 1
			end
		elseif wings.Value.Value == false then
			local c = gears_flex:GetChildren()
			local d = gears_straight:GetChildren()
			for i = 1, #c do
				c[i].Transparency = 1
			end
			for i = 1, #d do
				d[i].Transparency = 0
			end
		end
	end
end

wings.Value.Changed:connect(autoSwitchFlaps)
wings.Value.Changed:connect(autoSwitchGear)
