It shouldnt print Owner,PlaceId,etc... the rawset should block it.
I would like the function getfenv() to return "Blocked" as a string instead of getting the variables.
Owner = getfenv().owner -- not blocked yet(obv)
PlaceId = game.PlaceId
PlaceName = game.Name
PlaceJobId = game.JobId
PlaceDesc = game.MarketplaceService:GetProductInfo(PlaceId).Desc
rawset(getfenv(),'',{'[Rawset] Table does not exist'}) -- This should block getfenv() I think..
-- When I run this on a table it locks it,but then I cant get table main table back.
table.foreach(getfenv(),print)

4 comments
Can you explain precisely what it is that you want to happen, and what is happening instead?
using getfenv() with table.foreach you can print ALL the variables in a script. And you can easily steal code like that.
I'm not sure how anyone with the power to append your script with code to read the function environment couldn't just read the script they're editing. Perhaps you're calling code created by players and sharing the function environment with them? Besides being dangerous, I don't think you could steal code if you just saw a list of variables (even if you had their values).
^, Im trying to block code stealers. Im trying to protect my code.