--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)
