Inconsistencies with dev products?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
  2. What is the issue? Include screenshots / videos if possible!
    So idk if this is a network problem or something but i have a very simple script that clones a folder from serverstorage to your players pets folder when you purchase a developer product, now the issue is that sometimes it works and sometimes it doesn’t. Maybe its a loading issue with the entire game since there are alot of scripts? or is there some roblox issues?
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

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 DPID = 1178453273
local Players = game:GetService("Players")

MarketPlaceService.ProcessReceipt = function(ReceiptInfo)
    local Player = Players:GetPlayerByUserId(ReceiptInfo.PlayerId)  
    if Player then
        if ReceiptInfo.ProductId == DPID then
            local ServerStorage = game:GetService("ServerStorage")
            local RobuxPets = ServerStorage:WaitForChild("RobuxPets")
            local DemonicDominus = RobuxPets:WaitForChild("Demonic Dominus")
            local DemonicDominusClone = DemonicDominus:Clone()
            DemonicDominusClone.Parent = Player:WaitForChild("Pets")
            local PetID = DemonicDominusClone:FindFirstChild("PetID")
            local Rand = math.random(2,1000000)
            print(Rand)
            PetID.Value = Rand
            return Enum.ProductPurchaseDecision.PurchaseGranted
        end
    else
        return Enum.ProductPurchaseDecision.NotProcessedYet
    end
end

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like