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

How does one get the place description and/or place owner?

Asked by
unmiss 337 Moderation Voter
9 years ago

I've seen it in EISS. EISS is a completely custom API and uses a variable named 'server' (which I have no idea where it's defined, or if it is game), but nevertheless, there should be a way to get the game/place's description, right?

EISS' code:

server.MakeCommand('Shows you the current message of the day',0,server.AnyPrefix,{'motd','messageoftheday','daymessage'},{},function(plr,args)
    server.PM('Message of the Day',plr,server.MarketPlace:GetProductInfo(server.MessageOfTheDayID).Description)
end)

Or maybe it gets the product info from something. I don't know, but it works for places too as far as I saw.

I also wish to get the place's owner.

Any ideas?

1 answer

Log in to vote
1
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 getDataFromId = function (assetId)
    local info = marketplace:GetProductInfo(assetId)
    return {
        Creator = info.Creator;
        Name = info.Name;
    }
end

-- `Creator` itself is a table containing both the owner of the place's
-- Name, and his userId.

-- Name is simply the name of the asset associated with the `assetId`
-- passed as argument.

table.foreach(getDataFromId(242293881).Creator,print)

-- > Creator
-----> Name = string
-----> Id = number
0
Could you provide an example so I can better know how to do this? I need to grab the owner's name somehow. unmiss 337 — 9y
0
Alright ImageLabel 1541 — 9y
Ad

Answer this question