PromptPurchase()? equip item into roblox avatar

Hey!
When using MarketplaceService:PromptPurchase()… does the 3rd parameter actually does something? Its supposed to “equip” the bought item into roblox player’s account, right? I dont mean the player’s character model in game, I mean the player’s avatar on roblox.

Supposedly when player buy a product from marketplace inside a experience by using PromptPurchase(player, productID, true), the item should be added into the roblox avatar of the player right? Well… maybe Im confused but the item is not being added into the player’s AV, its only added into the player’s inventory. Am I misunderstanding?

image
image

How to add the item into the player’s AV after purchase is complete? (on roblox avatar, not in game)
I can do it by using AvatarEditorService, but… I thought there is a more straight-forward way when using the PromptPurchase() method

What is your script code that you use to make the PromptPurchase?
I know its PromptPurchase(player, productID, true) but what is your full code?
And is it coming from the Server or from the Client?

1 Like

Thank you for your reply!
My code its not important, we can reduce it into this:
A LocalScript:

local MPS = game:GetService("MarketplaceService")
local PLY = game.Players.LocalPlayer
MPS:PromptPurchase(PLY, 1534864861, true) -- fake ID just for example purpose

The question is clear, does PromptPurchase() is able to add the item into the roblox avatar of the player or not?

1 Like

It should add the item to the Roblox Avatar.
Although do note, in the documentation it says the following: “If prompting a purchase of a Limited item, the request must come from the server or the purchase fails.”

So if you’re prompting a purchase for a limited item and the request is coming from the client, it might not put it on the avatar. But normally it should put the item you bought on your Roblox Avatar if you put the boolean value for that to true.

2 Likes

Well, I tried with many items from marketplace, none were added into my roblox avatar, none are limited, the 3rd paramater is true yes, and actually its true by default. But, none items are being added into my avatar after successful purchase. That’s the issue.

1 Like

I understand the issue you’re facing, although i don’t know why it behaves like this.
It should add the items to the character. Your last shot is maybe handling it through Remote events?
Also, i did find this topic that i believe had the same issue as yours. There is not much spoken there, but the user did say he used Remote Events. Maybe its work a try :+1:

2 Likes

Thank you!
Sadly that’s exactly something that I’m not having issues with. I can add the item into the player’s character model in game without issues. My question is about adding the item into the main player’s avatar that the player is using on roblox account, not in game, I mean their main roblox account avatar.
Which supposedly PromptPurchase() should do… I guess…

2 Likes

Oh right, Apologies haha.
I don’t know what the issue is and i don’t think i can help any further. Goodluck with your game though! :+1:

2 Likes

From what I can see, equipIfPurchased was intended to insert a tool that a user purchases.

You should be able to use PromptSaveAvatar which takes a HumanoidDescription to prompt a user to update their roblox avatar with what you pass

2 Likes

Yes, as I suggested on the main topic I could use the AvatarEditorService to apply the assetID into the player’s account, but, due to this other bug I’m experiencing with PromptSaveAvatar(), I wanted to find how to do it without using it.

This is not clear for me. MarketplaceService:PromptPurchase() is to prompt the player to buy an asset from MarketPlace. As far as I understand Marketplace is not selling Tool instances/assets. Why would a function made for selling marketplace assets would include a parameter to add a tool?
Purchases related with tools should be handled as a DeveloperProduct by PromptProductPurchase and handling the Receipt

equipIfPurchased was an argument that was never really elaborated on and there is straight up no documentation on it other than 5+ year old google results.

From what I could find, it was meant to insert a tool into your backpack if you bought a gear.

1 Like

A gear makes sense. Thank you very much for your help and looking for that info. Yeah, I cant find updated info about this either…