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

MarketplaceService script not working?

Asked by 8 years ago

This script had no errors in the output. All I'm trying to do it make it so when you click the brick it prompts you to buy something.

local click_detector = Instance.new('ClickDetector', script.Parent)
local tool = game.ServerStorage.CandyBar
click_detector.MouseClick:connect(function(player)
 if game:GetService("MarketplaceService"):PlayerOwnsAsset(player,172535092) then
    print("Has asset")
else
    print("Does not have asset")
    game:GetService("MarketplaceService"):PromptProductPurchase(player, 172535092, false, Robux)
end
end)

0
Use PromptPurchase; Only use PromptProductPurchase for dev products; PromptPurchase is for assets.. Legojoker 345 — 8y
0
Still not working ^ CorruptBullet 5 — 8y
0
Never mind I had two click detectors in their.... it's fixed CorruptBullet 5 — 8y

Answer this question