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...
1 | local assetId = 27112438 --Insert any object Id |
2 |
3 | script.Parent.TextButton.MouseButton 1 Down:connect( function (player) --If true connect the function player |
4 | Game:GetService( "MarketplaceService" ):PromptPurchase(player, assetId) |
5 | 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??