Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Wondering if there's a way to get all places created using CreatePlace() API?

Asked by 6 years ago
Edited 6 years ago

So I'm messing with the CreatePlace() API and I'm having no real troubles. However, I want to have an in-game list of created places to teleport to.

Using the AssetService GetGamePlacesAsync() function just returns NON-created places. Is there a way to return a list of places created with the CreatePlace() API?

Code I'm using (no problems with it, modified from dev wiki)

` local pages = game:GetService("AssetService"):GetGamePlacesAsync()

while wait() do

for _, p in pairs(pages:GetCurrentPage()) do
    local Button = script.DimensionButtonTemplate:Clone()
    Button.Parent = script.Parent.DimensionList
    Button.DimensionID.Value = p.PlaceId
    Button.Text = p.Name .. " (" .. p.PlaceId .. ")"
end

 if pages.IsFinished then
      break
 end

 pages:AdvanceToNextPageAsync()

end

`

Answer this question