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:
if (script.Parent.Parent.Ammount.Text == "1") then local bloxyColaId = 1145492849 local player = game.Players.LocalPlayer function onClick() game:GetService("MarketplaceService"):PromptPurchase(player, bloxyColaId) end script.Parent.MouseButton1Click:connect(onClick) end