Im trying to make a Gui that you can click on and you can buy something. This is the script inside a ScreenGui with a TextButton. The script is...
local assetId = 27112438 --Insert any object Id script.Parent.TextButton.MouseButton1Down:connect(function(player) --If true connect the function player Game:GetService("MarketplaceService"):PromptPurchase(player, assetId) end)
Have you actually made the ScreenGui or SurfaceGui and inserted a script with the code above, and a TextButton? Is it placed in the StarterGui or Workspace??