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)
Would this do what you want?
function getfenv() return "Blocked" end
It overwrites the definition of getfenv so that later on in the script, any attempt to use getfenv() will use your new function instead of the default one.
The rawset you're using just adds a new variable to the environment: a variable with no name with the value of a table with the "[Rawset] Table does not exist" string.
A consequence of the function I've proposed is that table.foreach(getfenv(),print) will error, since getfenv() no longer returns a table.