local assetId = script.Parent.MarketID.Value
script.Parent.MouseButton1Down:connect(function()
Game:GetService("MarketplaceService"):PromptPurchase(game.Players.LocalPlayer, assetId, false, 2)
end)
I have this code inside of the gui to make it be able to buy something but it does not work for some reason.

1 comment
Do I need to keep the game.Player.LocalPlayer part?