I’m just as confused as those in the Unofficial Roblox Discord Server, so I’ll attempt to explain this and have it make sense.
So the for loop line, which in this case is line 12, isn’t working.
As you can see Buildings is an existing table, so if I were to loop through it since House1 is a member of the table, it should print House1.Name, which is House1. Instead, nothing happens and it does not print v.Name and instead, I don’t even know.
Output v
1
2
Script v
local Buildings = {
House1 = {
Name = "House1";
Description = "A simple, cozy, small home.";
Population = 10;
Price = 2500;
}
}
print(1)
if Player ~= nil and BuildingType ~= nil then
print(2)
for i, v in ipairs(Buildings) do
print(v.Name)
if BuildingType == v.Name then
print("go heyr")
game.ReplicatedStorage.RequestInfo:FireClient(Player, v.Name, v.Description, v.Price, v.Population)
end
end
end
I don’t know if this is an error on Studios end or I’m just being stupid and there’s an obvious solution. Thanks.