What do you want to achieve? A skip stage dev product!
What is the issue? Include screenshots / videos if possible! The product works fine in studio but when I go to use it in game I get the error shown below!
What solutions have you tried so far? Did you look for solutions on the Developer Hub? Yes. They all say to change to a server sided script and use only one script or create a new dev product. I have attempted all of these things, and still no help.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local skipId = 1321077107
local mps = game:GetService("MarketplaceService")
local plr = script.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Parent.Parent.Parent.Parent.TempStage.Value < #game.Workspace.TowerSections:GetChildren() then
mps:PromptProductPurchase(plr,skipId)
end
end)
mps.ProcessReceipt = function(info)
local productId = info.ProductId
local plrId = info.PlayerId
local plr = game.Players:GetPlayerByUserId(plrId)
if productId == skipId then
plr.TempStage.Value += 1
plr:LoadCharacter()
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
Please note: the functionality of this works perfectly fine in studio. I cannot seem to get it working in the actual roblox application.
Thanks for helping, but this is works perfectly fine processing the purchase and granting the skip stage in studio. The product will not process in roblox outside of studio. I will try that though.
You shouldn’t use Scripts to interact with UI, simply using a LocalScript would work just fine in your case, handle the receipt on the server and prompt on the client. I think this may be your issue on why it errors only in game.