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

How to make MarketPlaceService work?

Asked by 10 years ago
m = game:GetService("MarketplaceService"):GetProductInfo(script.MarketID.Value)
local player = script.Parent 
repeat player = player.Parent until player:IsA('Player') 
gui = script.Parent.Parent.Parent.Parent.Parent.Buyer

function onButtonClicked()
    gui.BuyerID.Value = script.MarketID.Value
    gui.Pic.Image = "http://www.roblox.com/Thumbs/Asset.ashx?format=png&width=420&height=230&assetId=" .. script.MarketID.Value
    gui.Titlef.TextLabel.Text = (m['Name'])     
    gui.ROBUX.Text = "BUY WITH R$ -"..(m['PriceInRobux'])
    gui.TIX.Text = "BUY WITH TIX -"..(m['PriceInTickets'])
    if gui.ROBUX.Text == "Buy for null Robux" then
        gui.ROBUX.Text = "Not available in Robux."
        gui.ROBUX.Available.Value = false
    end
    if gui.TIX.Text == "Buy for null Tickets" then
        gui.TIX.Text = "Not available in Tickets."
        gui.TIX.Available.Value = false
    end
    gui.Creator.Text = "Creator:"..(m['Creator'])
    gui.Description.Text = "Description:"..(m['Description'])
    script.Parent.Parent.Parent.Parent.Parent.Buyer.Visible = true 
    script.Parent.Parent.Parent.Parent.Parent.Shop.Visible = false
end
script.Parent.MouseButton1Down:connect(onButtonClicked)

Line four and down the system tells me it does not work even though I have all the parents correct. Somebody please help me with this.

Answer this question