Trying to make a script that prompts a player to make a purchase?
Asked by
4 years ago Edited 4 years ago
I am making a Gui for donations. The goal is that the player can enter a number into a text box and press a text button. For this example, the text that needs to be entered is 1. The text box is called Ammount and the text button is called Donate. But its not working, can you help me fix it. Here is the script:
01 | if (script.Parent.Parent.Ammount.Text = = "1" ) |
03 | local bloxyColaId = 1145492849 |
04 | local player = game.Players.LocalPlayer |
07 | game:GetService( "MarketplaceService" ):PromptPurchase(player, bloxyColaId) |
10 | script.Parent.MouseButton 1 Click:connect(onClick) |