I'm basically trying to use a brick with a click detector to prompt a developer product purchase. This works in Studio but not on the actual server. What am I doing wrong here?
local buyBTN = script.Parent
local player = game.Players.LocalPlayer
local MarketplaceService = game:GetService('MarketplaceService')
local productId = 19181612
--Connects to block and MPS then, buys the product
function onClicked(buyBTN)
MarketplaceService:PromptProductPurchase(player, productId)
end
script.Parent.ClickDetector.mouseClick:connect(onClicked)

1 comment
Thanks, it worked!