Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make players able to change a script in-game via an TextBox? [closed]

Asked by
Exarpo -3
5 years ago

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…

0
Use a variable that gets whatever was entered into the box, and then set that variable as the ID of the product. Pretty simple. Psudar 882 — 5y
0
How do I do that? XD Exarpo -3 — 5y
0
There is a "Text" property of every TextBox, which stores whatever the player has typed. Endergenius100 12 — 5y
0
.. i think my question got deleted ................ CjayPlyz 643 — 5y
View all comments (4 more)
0
i mean answer CjayPlyz 643 — 5y
0
oh.. this is a replicate question... well moderation voted ;P CjayPlyz 643 — 5y
0
welp CjayPlyz 643 — 5y

Marked as Duplicate by CjayPlyz and DeceptiveCaster

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?