Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Gear Dev Product not working?

Asked by 5 years ago

I would like to give players a gravity coil when the developer product is purchased. but when the person purchases the product no gear is given to the player.

local Marketplaceservice = game:GetService("MarketplaceService")

local devid = 499301771

Marketplaceservice.ProcessReceipt = function(receiptinfo)

for i, player in ipairs(game.Players:GetChildren()) do

if player.UserId == receiptinfo.PlayerId then

if receiptinfo.ProductId == devid then

local GravityCoil = game.ReplicatedStorage.CoilGravity:Clone().Parent

GravityCoil.Parent = player.Backpack

end

end

end

end

Answer this question