|
| 23 May 2013 03:01 PM |
How am i able to make a script then put whatever as the text inside of the script?
Like TextLabel's, you are able to make one in scripting and insert it's text, but i wish to do this with a Script created. |
|
|
| Report Abuse |
|
|
|
| 23 May 2013 03:03 PM |
I......don't quite understand what you're wanting help with?
e.e |
|
|
| Report Abuse |
|
|
|
| 23 May 2013 03:05 PM |
i think he/she means to add lines of text to a script, using a script.
You can use loadstring, but there are usually ways around this.
( ._.)|) ( D:) |
|
|
| Report Abuse |
|
|
|
| 23 May 2013 03:09 PM |
basically you are wondering how to do
s = Instance.new("Script") s.Text = ""
?
( ._.)|) ( D:) |
|
|
| Report Abuse |
|
|
|
| 23 May 2013 03:25 PM |
This kid clearly doesn't know what advanced scripting is, and second it's so stupid to say 'advanced only' because honestly that only limits your own help and makes you look bad like your new to the thread and in more than any case it is because someone like OP is new.
And Sloom is right. |
|
|
| Report Abuse |
|
|
ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
|
| 23 May 2013 03:57 PM |
| You cannot change the code of a script. I don't think so, at least, because that's what LuaLearners and the wiki says. |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 May 2013 05:00 PM |
@xX: Really now, you try it.
Go on, try it. Doesn't work? Proves you wrong. |
|
|
| Report Abuse |
|
|
|
| 23 May 2013 05:10 PM |
@Awesomeness, script.Source is a protected property, you can't read to or write from it. Though I had that same thought.
@Sun, please refrain from doing two things with your thread titles: saying "advanced scripters only" and making it undescriptive. You'll get far more help if you just title it after what you need help with, and a lot less fire than if you were trying to alienate the 'learning scripters'- which might know what you want but not as much as those who don't. Learning Lua isn't a linear process. |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 23 May 2013 05:14 PM |
What you are looking for is a Script's source property. This is a locked property and will only work in things like plugins. If you are looking for a replicate however, there are ways to get around this.
This is what I have done,
script.DSource.Changed:connect(function(v) local s,e = loadstring(v) if(e)then print(e) return end s() end)
-- Then to play a script (first make sure you have a StringValue inside the script named DSource), change DSource's Value.
ScriptThing.DSource.Value = "print('hi')" > hi |
|
|
| Report Abuse |
|
|
|
| 23 May 2013 07:52 PM |
http://wiki.roblox.com/index.php/How_to_edit_scripts_with_another_script
cheers
Most awesome ROBLOXian ever! : http://www.roblox.com/user.aspx?/1D%20=%20Noob |
|
|
| Report Abuse |
|
|
ForceSky
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 2379 |
|
|
| 23 May 2013 08:10 PM |
| OMG YOU SAVED MAH LIFE!!!! |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 23 May 2013 08:12 PM |
| That wiki link has some errors.. but Gordon just like "no u r no can haz wiki editor" so i no can fix it :c |
|
|
| Report Abuse |
|
|