local l = {} --Lobbies table
for i, v in pairs(Lobbies:GetChildren()) do --Lobbies folder in ServerStorage
if not table.find(l,v,i) then
table.insert(l,v)
end
end
for i, v in pairs(l) do
print(v.Name) --check if anything is in the table
end
return l
Refresh trigger:
refresh.MouseButton1Click:Connect(function()
local lobbies = Refresh:InvokeServer()
print(lobbies) -- it returns only table:randomguid
for i, v in pairs(lobbies) do --the NOT working part of the script after return
print(v)
local clone = template:Clone()
clone.Name = "Lobby"..#sf:GetChildren()
clone.lobbytitle.Text = v.Name
clone.Lobby.Value = v.Name
clone.plrs.Text = #v.Players:GetChildren().."/4"
if v.Password.Value ~= "" then
clone.Pass.Value = v.Password.Value
else
Instance.new("BoolValue",clone).Name = "Passless"
end
clone.Parent = sf
end
end)
What the console is displaying here is the memory address of the table.
If you want it to display the table as a “tree” you have to disable log mode Log Mode. It should fix your problem.
Yes because you are passing an array of instances which are not visible to the client. Instead of passing the entire instance, you can insert the name into the table.