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

How to get place's name from id?

Asked by 10 years ago

I am making a script to teleport to other places, and I need to know how I can get the name of a place from it's id.

1 answer

Log in to vote
0
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

The MarketplaceService provides this sort of information.

Specifically, in this case, you will use the GetProductInfo method.

The example code on that Wiki article gives you what you need. I reproduce it here:

local Asset = game:GetService("MarketplaceService"):GetProductInfo(125378389)
print(Asset.Name .. " :: " .. Asset.Description)
Ad

Answer this question