Greetings. I have created a homestore, and on the maneqip the MarketPlaceService will work on ROBLOX Studio Test, but in-game while I have published it won’t come up, my script is:
local shirtId = 5025650655
--Prompts the player to purchase the GearItem
script.Parent.ClickDetector.MouseClick:connect(function(player)
Game:GetService("MarketplaceService"):PromptPurchase(player, 5025650655)
end)
Game should be game and connect should be Connect: the former of each of these are deprecated and it’s preferable to use the latter.
@CAP7A1N@ML4Bzero PromptPurchase is not like PromptProductPurchase, it requires a player object, not their userId
@OP (@Lukas_811), do you have any errors? It would also help if you can disclose the script’s context type (whether it is a local or server script) and where it’s parented
local MarketPlace = game:GetService("MarketplaceService")
local Player = game.Players.LocalPlayer
--The main code for the ClickDetector
script.Parent.ClickDetector.MouseClick:Connect(function()
MarketPlace:PromptPurchase(Player, 5025650655)
end)