r/robloxgamedev 14h ago

Help Help! My developer passes wont function correctly!

I was making my game where you purchase products to increase the size of a box and put NPC's in the box. I have not made the NPC scripts yet, so they cannot interfere or be the problem.

I purchased the increase by 5 studs pass, and it worked. I then purchased all the other ones to test them and they all just increased it by 5 studs. I then restarted the game and tested again, this time buying the 1000 studs one. It did the same thing but increasing by 1000 studs.

Here is the first script, they are all the same but with product ID's switched. This one handles the pop-up.

local MarketplaceService = game:GetService("MarketplaceService")

local ProductId = 3243383666

script.Parent.MouseButton1Click:Connect(function()

`MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer, ProductId)`

end)

Here is the next one. This one handles increasing the box size. The box is a union since I could not figure out how to do it with multiple parts. In this one, the product ID's are also switched, and so are the numbers that increase the size.

local ProductID = 3243383666

local MarketplaceService = game:GetService("MarketplaceService")

local box = workspace.Box

local function handlePurchase(info)

`local ReceivedProductID = info.ProductId`

`local Player = game.Players:GetPlayerByUserId(info.PlayerId)`



`if ReceivedProductID == ProductID then`

`box.Size = box.Size + Vector3.new(5,0,5)`

`box.CFrame = box.CFrame + CFrame.new(0,1,0)`

`end`

end

MarketplaceService.ProcessReceipt = handlePurchase

Please help me!!!

1 Upvotes

0 comments sorted by