Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how do you insert a script and then edit the text inside that script?

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

4 comments

0

Can you please edit your post to be more specific?

0

I don't think it's possible to do that. I recommend just putting the GUI in Lighting then cloning it.

0

I want to insert a script into an object then edit that scripts text

0

You can't edit a Script's Source property using another 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.