Hello, I made a simple whitelist system for my game.
local Players,GroupService = game:GetService("Players"),game:GetService("GroupService")
local MinRole = 4
local GroupInfo = GroupService:GetGroupInfoAsync(game.CreatorId)
Players.PlayerAdded:Connect(function(P)
if P:GetRankInGroup(game.CreatorId) < MinRole then
P:Kick([[This game is currently open exclusively to people in the "]] .. .. [[" role in the game's group, please wait until release!]])
end
end)
How do I have it so that the code gets the Role name from the MinRole variable?
I theorized that you would make a simple iteration through the GroupInfo.Roles
table but I don’t know how to do that, so I need some help!
Thanks