|
| 03 May 2014 02:42 PM |
Exactly what would
setfenv1(1,{})
do? |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 03 May 2014 02:43 PM |
Stuff about your question: http://www.lua.org/pil/14.3.html |
|
|
| Report Abuse |
|
|
|
| 03 May 2014 02:50 PM |
That didn't really help.
I just wanna know, would that wipe out every function? Like print, Instance.new, Vector3.new, etc. |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
| |
|
|
| 03 May 2014 03:02 PM |
| Anyone wanna tell me what that would do? |
|
|
| Report Abuse |
|
|
|
| 03 May 2014 03:04 PM |
just did it, print doesn't work. and it then won't recognize "Workspace" as a variable
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 03 May 2014 03:30 PM |
What about Instance.new
Wait does that get rid if all references? |
|
|
| Report Abuse |
|
|
|
| 03 May 2014 03:32 PM |
apparently so
21:31:35.699 - setfenv(1,{}) Instance.new('Part', Workspace):1: attempt to index global 'Instance' (a nil value) 21:31:35.700 - Stack Begin 21:31:35.700 - Script 'setfenv(1,{}) Instance.new('Part', Workspace)', Line 1 21:31:35.700 - Stack End
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 03 May 2014 05:03 PM |
Wow...
So those 14 characters makes it impossible for a script to do anything? |
|
|
| Report Abuse |
|
|
|
| 03 May 2014 06:42 PM |
| setfenv() does exactly what its name implies: set f[unction] env[ironment]. Basically, the environment originally had a table holding all the global variables, such as print, Instance.new, etc. When you set an empty table to the environment, you effectively lose all the references to those variables. |
|
|
| Report Abuse |
|
|
|
| 04 May 2014 05:15 PM |
Snap... This whole time I meant setfenv(1,{})
Sorry XD |
|
|
| Report Abuse |
|
|