Create a UIListLayout with a module script

Hello,

I’m trying to make a UIListLayout that for each variable in the module script it creates another frame. I’ve made the module script but not quite sure how to make the script that turns the variables in the modulescript into actual frames.

Here is my modulescript:

local cars = {
	
	["Car1"] = {
		CarName = "Bannana Car";
		CarDesc = "A weird car"
	};
	
	["Car2"] = {
		CarName = "Bannana Car V2";
		CarDesc = "A even more weird car"
	}
}

return cars

How would I create a localscript that turns these variables into seperate frames? All help appreciated. :slight_smile:

To loop through a table you can do:

for i,v in pairs(table) do -- index, value

end

To create frames you can do:

local frame = Instance.new("Frame")
1 Like