Build in a new world
#16
This line:
Code:
if (Player:GetGroups() == "Admins") then

You should do this instead:
Code:
for Key, Group in pairs(Player:GetGroups()) do
  if (Group:GetName() == "Admins") then
    return true
  end
end

(Note that I don't do Lua at all so the code may be syntactically wrong)
Explanation: Player may be a member of multiple groups; Player:GetGroups() returns all the groups, so you need to search the returned list of groups for yourparticular group name.
Reply
Thanks given by:


Messages In This Thread
Build in a new world - by Boo - 03-24-2012, 11:33 PM
RE: Build in a new world - by NiLSPACE - 03-24-2012, 11:36 PM
RE: Build in a new world - by Boo - 03-25-2012, 12:15 AM
RE: Build in a new world - by Boo - 03-26-2012, 04:19 PM
RE: Build in a new world - by distroyed123 - 03-27-2012, 12:40 PM
RE: Build in a new world - by Boo - 03-27-2012, 11:43 PM
RE: Build in a new world - by mtilden - 03-28-2012, 02:09 AM
RE: Build in a new world - by Boo - 03-28-2012, 02:24 AM
RE: Build in a new world - by xoft - 03-28-2012, 05:16 AM
RE: Build in a new world - by Boo - 03-28-2012, 03:56 PM
RE: Build in a new world - by Boo - 04-02-2012, 05:16 PM
RE: Build in a new world - by geser - 04-02-2012, 05:57 PM
RE: Build in a new world - by Boo - 04-11-2012, 12:10 AM
RE: Build in a new world - by FakeTruth - 04-11-2012, 12:53 AM
RE: Build in a new world - by Boo - 04-11-2012, 06:20 PM
RE: Build in a new world - by xoft - 04-11-2012, 06:30 PM
RE: Build in a new world - by Boo - 04-11-2012, 08:23 PM
RE: Build in a new world - by FakeTruth - 04-11-2012, 08:36 PM
RE: Build in a new world - by Boo - 04-11-2012, 08:47 PM
RE: Build in a new world - by FakeTruth - 04-11-2012, 10:55 PM
RE: Build in a new world - by Boo - 04-12-2012, 01:59 PM
RE: Build in a new world - by Boo - 04-12-2012, 11:11 PM
RE: Build in a new world - by xoft - 04-13-2012, 06:07 AM
RE: Build in a new world - by FakeTruth - 04-13-2012, 06:14 AM
RE: Build in a new world - by xoft - 04-13-2012, 03:26 PM
RE: Build in a new world - by Boo - 04-13-2012, 06:30 PM
RE: Build in a new world - by xoft - 04-13-2012, 07:24 PM
RE: Build in a new world - by Boo - 04-13-2012, 07:58 PM



Users browsing this thread: 5 Guest(s)