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

How to make a GUI that shows the current title of the particular PlaceID?

Asked by 8 years ago

I am making a place teleporter on my group's hub, but how do I make the TextLabel have its text the current title of the place with aspecific PlaceID?

1 answer

Log in to vote
0
Answered by
xAtom_ik 574 Moderation Voter
8 years ago

Well, this is hard but I would use :GetGamePlacesAsync(). It gets the games in the current game and also the current game itself and gets its name and id, you might have to investigate yourself about the textlabel and that, but try using this (You don't need to publish the place!)

This is the wiki script

local pages = game:GetService("AssetService"):GetGamePlacesAsync()
while true do
     for _,place in pairs(pages:GetCurrentPage()) do
          print("Name: " .. place.Name)
          print("PlaceId: " .. tostring(place.PlaceId))
     end
     if pages.IsFinished then
          -- we reached the last page of results
          break
     end
     pages:AdvanceToNextPageAsync()
end

Hope this helped you!

Ad

Answer this question