Get a players UserGroup?

Hello Facepunch,
I’ve been trying to find out how I can go about getting a players or entities usergroup. I have tried:
[lua]ent:GetNWString(“usergroup”);[/lua]
Though this has come to no avail, why didn’t Garry add pl:GetUserGroup(). Is there any other way I can do this? As I’m wanting to get the usergroup of the trace entity (The entity the player is looking at.) but only defining it if the entity is a player.

Any help would be appreciated,
BastinkaLive

[lua]local pmeta = _R.Player;
local oldSetUserGroup = pmeta.SetUserGroup;

function pmeta:SetUserGroup( ug )
self:SetNetworkedString( “usergroup”, ug );
oldSetUserGroup( self, ug );
end

function pmeta:GetUserGroup( )
return self:GetNetworkedString( “usergroup” ) or “none”;
end[/lua]

Probably overkill, but this is all I can think of at the moment.

Or just use
[lua]
ent:GetNWString(“UserGroup”)
[/lua]

I didn’t realise the player’s user group is already stored in a NW Var.

Really, is it truly just a capitalization error?
I’ll try it.