menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripters
question about setfenv()
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
question about setfenv()
lostend
Join Date: 2011-08-21
Post Count: 8265
#170972447
Thursday, August 13, 2015 3:31 AM GMT
so like is this right: setfenv('{','[') idk wtf its used 4
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
lombardo2
Join Date: 2008-11-30
Post Count: 1603
#170973676
Thursday, August 13, 2015 3:43 AM GMT
No. It's used for changing the environment of the function, it can be useful for certain things, for example sandboxing. a = setmetatable({x = "hi"},{__index = getfenv(0)}) x = "hola" function b() print(x) end b() setfenv(b, a)() >hi >hola
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
cntkillme123
Join Date: 2013-02-10
Post Count: 541
#170975422
Thursday, August 13, 2015 3:59 AM GMT
https://docs.google.com/document/d/1A1SBjRqFKFxaw7_RnsI96CKzBCcAOkuDPOTG8DIZywA idk how much itll help you, and i should rewrite it, but yeah.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right