Hello everyone! I’ve encountered an issue while using MarketplaceService
in my game script. Specifically, when attempting to publish a game with the function MarketplaceService:PromptProductPurchase
, I’m encountering an error that prevents successful transactions. The error message I receive states “Unknown error”, which suggests that the attempt to deduct Robux from the player is failing without a clear reason provided.
local function PublishGame(gameData)
if gameData.Name and gameData.Description and gameData.IconId and gameData.ThumbnailId and gameData.GameId then
local success, errorMsg = MarketplaceService:PromptProductPurchase(player, productID)
if success then
print("Published with 1000 Robux fee deducted!")
else
local errorMessage = errorMsg or "Unknown error"
warn("Publish failed: " .. errorMessage)
print("Error message:", errorMessage)
end
AddGame.GameName.GameName.Text = ""
AddGame.Description.Description.Text = ""
AddGame.IconID.IconID.Text = ""
AddGame.ThumbnailID.ThumbnailID.Text = ""
AddGame.GameID.GameID.Text = ""
else
warn("Cannot publish: All fields are required.")
end
end
If someone could help out, that would be great. Thanks!
This is not the full script, but according to the error, it occurs here.