You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? I want to improve my understanding on the roblox marketplace developer products server script.
-
What is the issue? Include screenshots / videos if possible! I don’t understand how the script works
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub? Yes
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 MarketPlaceService = game:GetService("MarketplaceService")
local DevProductId = 1267279630
local Player = game:GetService("Players")
local function ProcessDevProductReceipt(receiptInfo)
local PlayerUserId = Player:GetPlayerByUserId(receiptInfo.PlayerId)
if receiptInfo.ProductId == DevProductId then
if PlayerUserId then
print(PlayerUserId.Name .. " Has Bought the " .. receiptInfo.ProductId .. " Dev Product! ")
end
end
if not PlayerUserId then
-- Player Probably left the game or There is no Player so call the callback function incase they leave the game while purchasing the dev product
return Enum.ProductPurchaseDecision.NotProcessedYet
end
-- If Player this will return
return Enum.ProductPurchaseDecision.PurchaseGranted
end
-- Callback
MarketPlaceService.ProcessReceipt = ProcessDevProductReceipt
Hi, so I’m posting this topic because I’m having a hard time understanding this marketplace service developer product server script i got from a YouTube tutorial even after watching the youtube tutorial i still don’t understand the script. Does anyone have experience with developer products that can help me understand this server script thank you for your help