I'm making a script that will make a GUI inside my playerGUI along with a textbutton but I want to put a script inside the textbutton and then edit the script
COMMUNITY QUESTION
how do you insert a script and then edit the text inside that script?
1 answer
Here's a strategy that could be easier for you. Since I'm guessing that the player GUI's script is going to be programming the text button, make it so all connections are made inside the original script. Here's an example for a clicked script.
local tb = Instance.new("TextButton", playerGUI)
tb.Size = UDim2.new(1,0,1,0)
tb.Position = UDim2.new(0,0,0,0)
tb.MouseButton1Up:connect(function()
-- MORE CODE
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Can you please edit your post to be more specific?
I don't think it's possible to do that. I recommend just putting the GUI in Lighting then cloning it.
I want to insert a script into an object then edit that scripts text
You can't edit a Script's Source property using another Script.