It's supposed to create a SurfaceGui with a textbutton, that, when clicked, prompts me with a DevProduct. Output doesn't give any errors. Also, this is a localscript in StarterGui.
Code:
game.Players.PlayerAdded:connect(function(p)
local pi = 43873080
local SG = Instance.new("SurfaceGui")
SG.Parent = game.Workspace.don8
local TB = Instance.new("TextButton")
TB.Parent = SG
TB.Size = UDim2.new(1,0,1,0)
TB.Text = "Click Me!"
TB.MouseButton1Down:connect(function()
Game:GetService("MarketplaceService"):PromptProductPurchase(p, pi)
end)
end)

2 comments
Thanks! That worked!
You're welcome :)