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

Get Place name by ID?

Asked by 9 years ago

I'm working on a singleplayer-type game with servers.

I need to get the names of places by their ids... Anyone?

0
Remember to accept the answer if it helped instead of upvoting... EzraNehemiah_TF2 3552 — 9y

1 answer

Log in to vote
2
Answered by
ImageLabel 1541 Moderation Voter
9 years ago

You could use GetProductInfo from the MarketplaceService, which could return all or any of these values about any ROBLOX asset.

local marketplace = game:GetService('MarketplaceService')

local getNameFromId = function (assetId)
    local info = marketplace:GetProductInfo(assetId)
    print(info.Name)
end
1
Thanks! LuaLlama 10 — 9y
1
Remember to accept the answer. W8X 95 — 9y
Ad

Answer this question