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

is it possible to add a script using instance.new and also add code to that script?

i'm trying to create a text button and then input a local script into it as a child which will run the textbutton. Is there anyway to do this all in the same script that is creating the text button?

2 comments

0

Yes it is possible to do both of those things. But the Source is limited to studio only as it is a http://wiki.roblox.com/index.php?title=API:ProtectedString

0

But I am not sure you need this. You can connect any event for this new text button without any additional scripts.

3 answers

You could also just make the gui then put it into ReplicatedStorage, Lightin, but not in starterGui, when you want to open the gui, put the gui you want to appear in the PlayerGui of the LocalPlayer, It's easier!

This discussion is preserved as it was. New answers, comments, and votes are closed.