So I have this problem with MarketplaceService that it won't give me 10000 cash when I buy it online. Heres the script:
local gui = script.Parent
local plr = gui.Parent.Parent.Parent
local market = game:GetService("MarketplaceService")
function add10000cash()
if plr then
local leaderstats = plr:FindFirstChild("leaderstats")
if leaderstats then
local cash = leaderstats:FindFirstChild("Cash")
if cash then
cash = cash + 10000
end
end
end
end
script.Parent.MouseButton1Click:connect(function()
market:PromptProductPurchase(plr, 22957008, false, Enum.CurrencyType.Robux)
add10000cash()
end)
Can anyone tell me whats happening? Thanks!
