Help with finding a model when cloned from a found child

Basically my script loops through a folder and clones a gui for every model found what I want to do is when I click the cloned gui it will clone the model.

Heres my script:

if game:GetService("ReplicatedStorage").Vehicles:FindFirstChildOfClass("Folder"):FindFirstChildOfClass("Model") then
			local Path = game:GetService("ReplicatedStorage").Vehicles
			for i,v in pairs(Path:GetChildren()) do
				if v:IsA("Folder") then
					for i, v in pairs(v:GetChildren()) do
						if v:IsA("Model") then
							local Clone = clonegui:Clone()
							Clone.Parent = gui.SpawnProperties.VehiclesFrame.VehicleCloneFrame
							Clone.Text.Text = v.Name
						end
					end
				end
			end
		end
		end)

What happens with your current code? We need a bit more information. The only problem I notice (I quickly glanced over the code) was most likely:

Clone.Text.Text

Basically, it loops through a folder and when it finds a model it will clone a gui into plrgui.

But what I want it to do is once i click the gui which got cloned it will clone the model which was cloned due to it.

I think I’m onto something.

One last question, I see that you’re working with vehicles, so let’s say the model was called car1. The clone’s text would be also car1.
Now that you click on the gui with the name car1, you want the original model, whos name we stole (original car1 model) to be cloned. Right?

Yes, that’s is right.

(ignore just so post reaches character limit)

You would have to add a mouse click event on clone gui and clone the model inside it. As you have them defined you can do something like this :

clone.MouseButton1Down:Connect(function()
  local ModelClone = v:Clone() -- This would be the model's clone
end)
if game:GetService("ReplicatedStorage").Vehicles:FindFirstChildOfClass("Folder"):FindFirstChildOfClass("Model") then
	local Path = game:GetService("ReplicatedStorage").Vehicles
	for i,v in pairs(Path:GetChildren()) do
		if v:IsA("Folder") then
			for i, v in pairs(v:GetChildren()) do
				if v:IsA("Model") then
					local Clone = clonegui:Clone()
					Clone.Parent = gui.SpawnProperties.VehiclesFrame.VehicleCloneFrame
					Clone.Text.Text = v.Name

					Clone.MouseButton1Down:Connect(function()
						local ModelClone = v:Clone() -- This would be the model's clone
					end)
				end
			end
		end
	end
end
end)

@Razor_IB’s solution should work. I had a similar idea but was unfortunately AFK for a while. Feel free to mark his reply as the solution if it worked, as I just inserted his code, while he wrote it.