|
| 07 Dec 2016 04:27 PM |
HEADS UP-! I know it's possible, since Voidacity's Script Builder has achieved this!
So if a script is parented to nil (script.Parent = nil) it becomes out of sight for scripts to detect. I figured a way around this (when a script is added, it is inserted into a table) and i can re-parent them to Workspace, disable, and even destroy them, but when referencing a script in nil the script is automatically duplicated, and therefore am unable to terminate it.
Anyone figured a way around this yet? All constructive responses greatly appreciated-! |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2016 04:28 PM |
| Do you have a simple repro so I can see what you mean? |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2016 04:32 PM |
| ^ ######## # ## game.DescendantAdded(connect(function(object) if object.ClassName == "LocalScript" or object.ClassName == "Script" then table.insert(gScripts, object) end end for z,v in pairs(gScripts) do v.Parent = workspace; end On a finishing note, if you didn't get it from my OP you most likely do not know the solution to this problem, though. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2016 04:34 PM |
the_table = {}
game.DescendantAdded:connect(function(x) if x.ClassName == "LocalScript" or x.ClassName == "Script" then table.insert(the_table, x) end end)
for z,v in pairs(the_table) do v.Parent = workspace; ?or v:Destroy() ?or v.Disabled = true; end |
|
|
| Report Abuse |
|
|
| |
|