I want to make players able to change a script in-game via an GUI (TextBox). When they write an number (an ID of a product) in the GUI and press enter, I want to make that the “ID OF THE PRODUCT” get replaced with the number the player writes in the GUI.
THE SCRIPT:
local assetid = “ID OF THE PRODUCT”
local cd = script.Parent.ClickDetector
cd.MouseClick:connect(function(player)
game:GetService(“MarketplaceService”):PromptPurchase(player,assetid)
end)
Please help…

8 comments
Use a variable that gets whatever was entered into the box, and then set that variable as the ID of the product. Pretty simple.
How do I do that? XD
There is a "Text" property of every TextBox, which stores whatever the player has typed.
.. i think my question got deleted ................
i mean answer
oh.. this is a replicate question... well moderation voted ;P
welp
https://discord.gg/e6bA99E for BUX