Connecting Roblox Marketplace in Game

Hi guys,

I’m curious, are we able to connect roblox marketplace items to our game? Meaning we prompt players to purchase marketplace items inside our game?

Also, if for example, players purchase a gear in the roblox marketplace, e.g. a sword, can we link up the sword to be used in our game?

1 Like

MarketplaceService | Roblox Creator Documentation is the answer

1 Like

Yes it is, Theres a whole function for it for example,

local productId = --Item ID
game.Players.PlayerAdded:Connect(function(player)
	Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
end)

But this is meant for me to sell my own items that I make in the game. is there a way to link it up with the Roblox Avatar Shop items and allow players to use them in my game?

So if I don’t own the product, can i still prompt purchase for it?

Yes you can, All you need is the id for it.

1 Like

If you are still unsure, here is an official article in the Developer Hub to teaches you everything you need to know.

Ive tried to see if I can link my game to this:
https://web.roblox.com/catalog/11419319/Healing-Potion

by doing a code:

local productId =11419319 --Item ID

game.Players.PlayerAdded:Connect(function(player)

game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)

end)

However, it prompts this:
image

Why is that so?

  1. You might want to move this topic to #help-and-feedback:scripting-support if you can.

  2. You cannot prompt purchases of items that are on the website > catalog and are made by someone else (i think you can prompt purchases for clothing that you made). You can only prompt purchases for in-game developer products.

  3. web link…?

I’m not the kind of guy who does this, but did you test outside studio? And make sure you enable third-party sales in game settings > security