The code refused to run, nothing is printed and nothing is draw to my screen except "hello?" Can anyone please explain why this wont function correctly? It should draw an image and text Label with the correct info as specified in the houseConfig table. Not even i is printed from the for loop, someone please help?
wait(2)
print("hello?")
local houseConfig = {
house1 = {
Name = "House 1",
Owner = "Noone",
Image = "rbxgameasset://Images/download_2",
Price = 100
},
house2 = {
Name = "House 2",
Owner = "Noone2",
Image = "rbxgameasset://Images/download_2",
Price = 200
}
}
local gui = script.Parent
for i = 1, #houseConfig do
print(i)
local houseImage = Instance.new('ImageLabel',gui.Frame) --Draw Image Button
houseImage.Name = tostring(i.Name)
houseImage.Size = UDim2.new(0.12,0,1,0)
houseImage.Position = UDim2.new(10,0,0,i*0.1)
houseImage.Image = i.Image
local houseName = Instance.new('TextLabel',houseImage) --Draw Text Label
houseName.Position = UDim2.new(0.5,0,1.1,0)
print(i.Name)
houseName.Name = tostring(i.Name)
houseName.Text = tostring(i.Name)
houseName.Font = "SourceSansBold"
houseName.TextColor = BrickColor.White()
houseName.FontSize = "Size18"
end
