Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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

2 comments

0

Could you provide an example so I can better know how to do this? I need to grab the owner's name somehow.

0

Alright

This discussion is preserved as it was. New answers, comments, and votes are closed.