Creating a Shirt Purchase Button

I am trying to create a shirt purchase button and the script will use string.split() to grab the shirtTemplate from the shirt model. However, the shirt is from a group and whenever I type it into the shirtTemplate it changes to it’s original creator’s shirt, so the promptpurchase() only returns “this item is not for sale”.
Is there a way to fix this? (I’ve been trying to fix it for a long time)

1 Like

Is the shirt from a third-party group? If so, enable sales from them via game settings in the studio.

No, it is not a third-party group. The experience is owned by the group. The original owner (who created the shirt) uploaded the shirt ID into the game, but somehow it automatically changes into the template. (NOT THE ACUTAL SHIRT THAT I CAN SELL)

Example:
Group Shirt ID I put in: [ Content Deleted ] - Roblox
Owner Shirt ID I get out: Nike Puffed Jacket - Roblox

It automatically substitutes the id, so I cannot retrieve the correct one to promptPurchase().

Oh, that makes sense - yes, the .ShirtTemplate value would change to the actual template of the shirt, and can’t be purchased. You’d need to store the ID of the shirt somewhere (like a NumValue inside of the ShirtTemplate), and use that to prompt.