Jakepoz
|
  |
| Joined: 16 Feb 2013 |
| Total Posts: 83 |
|
|
| 21 Feb 2014 07:03 PM |
| Okay so I'm creating a script and I need it so if I say a certain command like l; (Lags a player)(Admin script) it will create a new localscript inside the players backpack. I can't put it anywhere in the game. I want it to be created from scratch from the main script itself Is that possible? |
|
|
| Report Abuse |
|
|
7y13rb
|
  |
| Joined: 28 May 2011 |
| Total Posts: 223 |
|
|
| 21 Feb 2014 07:04 PM |
| I've heard of it...i dont know how to do it though, but yeah i think its possible |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 21 Feb 2014 07:05 PM |
No, that's not possible since the 'Source' property has been locked for quite a few years now.
The best you can do is have a pre-made LocalScript, and then clone it to the player. Also, I don't see why you want to lag-ban someone (if that's what you're going for), just use the ':Kick()' method on them. |
|
|
| Report Abuse |
|
|
Delones
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 1703 |
|
|
| 21 Feb 2014 07:07 PM |
| No, but you could have a script with a stringvalue and use loadstring. |
|
|
| Report Abuse |
|
|
Jakepoz
|
  |
| Joined: 16 Feb 2013 |
| Total Posts: 83 |
|
|
| 21 Feb 2014 07:13 PM |
@Data It is possible Optiplex123 Showed me a way that works in Script Builder NewScript=Instance.new('LocalScript',v.Name) NewScript.Source="while true do end" This method creates the script with the correct source but does not run it... any help making it run? |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 07:15 PM |
Simply use a premade localscript with a string value.
in the localscript, put
repeat wait(1/30) until script.StringValue.Value ~= "" --wait for the code to load
loadstring(script.StringValue.Value)
script:Destroy() --Optional, but helps to keep things clean. |
|
|
| Report Abuse |
|
|
Jakepoz
|
  |
| Joined: 16 Feb 2013 |
| Total Posts: 83 |
|
|
| 21 Feb 2014 07:17 PM |
This works just doesnt run the script... And I don't want it to be premade I want as little lag as possible.
NewScript=Instance.new('LocalScript',game.Players.Jakepoz.Backpack) NewScript.Source="local n = Instance.new('Message',game.Workspace) n.Text='while true do end'" |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 21 Feb 2014 07:17 PM |
@Jake, That shouldn't (and wouldn't) work, at all, unless you're running it from the command bar or equivalent. The 'Source' property is locked.
It also wouldn't work, because you can't instance a script to a string. |
|
|
| Report Abuse |
|
|
L0cky2013
|
  |
| Joined: 30 Jul 2012 |
| Total Posts: 1446 |
|
|
| 21 Feb 2014 07:18 PM |
| Its possible to do it in the command bar and in plugins. |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 21 Feb 2014 07:19 PM |
Also, my reply was in reply to this line (second part)
"NewScript=Instance.new('LocalScript',v.Name)" |
|
|
| Report Abuse |
|
|
|
| 21 Feb 2014 07:20 PM |
A premade localscript which you can clone into playerGUIs is not laggy at all, not much anyways.
It's the simplest working method. |
|
|
| Report Abuse |
|
|
Jakepoz
|
  |
| Joined: 16 Feb 2013 |
| Total Posts: 83 |
|
|
| 21 Feb 2014 07:22 PM |
I'm testing it online as soon as ROBLOX updates
|
|
|
| Report Abuse |
|
|