local groupId = 5144614
function added(player)
local ls = Instance.new("IntValue")
ls.Name = "leaderstats"
local infoplr = Instance.new("IntValue")
infoplr.Name = "importantplr"
--leaderstats
local role = Instance.new("StringValue")
role.Name = "Rank"
--end of line
--Console statistics
local hours = Instance.new("IntValue")
hours.Name = "Hours"
local ma = Instance.new("BoolValue")
ma.Name = "MachineAccess"
ma.Value = false
local Admin = Instance.new("BoolValue")
Admin.Name = "Admin"
--end of line
role.Value = player:GetRoleInGroup(groupId)
ls.Parent = player
role.Parent = ls
infoplr.Parent = player
--proo34 statistics
hours.Parent = infoplr
ma.Parent = infoplr
Admin.Parent = infoplr
if player:GetRoleInGroup(groupId) >= 16 then
--right here ^^
game.Players.LocalPlayer:WaitForChild("importantplr")
game.Players.LocalPlayer.importantplr:WaitForChild("Admin")
Admin.Value = true
else
Admin.Value = false
end
--end of line
end
game.Players.PlayerAdded:connect(added)
This script decides if the player should have a boolean called admin true or false, as well as other ranks, but the admin only should work for people over a certain rank which is 16. Can figure out why it errors out. Thanks for the help!

2 comments
its :GetRankInGroup
:GetRoleInGroup will return the string value of the players role..such as "Owner" or "Guest"