What I want to achieve is that Player:SetDeaths is not accessible while Player:Deaths will be accessible.
local newgt = {print = print, player = LocalPlayer()}
setmetatable(newgt, {})
setfenv(1, newgt)
print(player:Deaths())
In the example above I can access ALL methods from LocalPlayer() but I want to limit this to the methods of my choice
local newgt = {print = print, playerdeaths = LocalPlayer():Deaths()}
setmetatable(newgt, {})
setfenv(1, newgt)
print(playerdeaths)
This was the only way I could find, but it looks annoying.