Matching car brands and autofilling grid layout

  1. What do you want to achieve?
    I am trying to make it so depending on the imagebutton you click (representing a car brand) it automatically matches the name of the button from the gui and cars folder in storage, example
    button named bmw, car in storage folder named bmw. clones all of them into each of its viewport/buttons inside of a frame with grid layout

  2. What is the issue? Issue is it does non of what i coded in, it just turns most of my gui invisible without cloning anything into the frame

  3. What solutions have you tried so far? I tried string.match and if statements for if the button clicked has the same name as the brand folder

local vpf = script.CarViewPort

for i, brands in pairs(frame.CarBrandFrame:GetChildren()) do
	brands.MouseButton1Click:Connect(function()
		frame.CarBrandFrame.Visible = false
		frame.CarShopButton.Visible = false
		frame.CarScrollingFrame.Visible = true
		for i, CarB in pairs(CarFolder:GetChildren()) do
			local carContainers = CarFolder:GetChildren()
			local carMatch = carContainers:GetChildren()
			local frameMatch = frame.CarBrandFrame:GetChildren()
			local matchedNames = string.match(frameMatch, carMatch)
			if matchedNames then 
				local tempBrand = string.match(carMatch, matchedNames)
				local bClone = tempBrand:Clone()
				local vpfClone = vpf:Clone()
				vpfClone.Parent = frame.CarScrollingFrame
				bClone.Parent = vpfClone
				local camera = Instance.new("Camera")
				vpfClone.ViewportFrame.CurrentCamera = camera
				camera.Parent = vpf.ViewportFrame
				camera.CFrame = tempBrand.CameraPosition.CFrame

			end
		end
	end)
end

Screenshot_299

Please keep inmind i am still new to roblox programming, however i look far and wide into the API or try to atleast, Thank you all in advance for the help!