Hello,
I would like to be able to give the “Tester” rank for my group game to only be able to play and not edit.
The issue is that ROBLOX only gives me the ability to give edit ability in the Roles Settings in the group and only Public or Private in the Game Settings.
I’ve tried to see if there are any work-around but I haven’t found any. I tried looking on the Dev Forum however I still couldn’t find any help.
If you have any idea on how to make this work, please let me know.
Thanks,
Arian
That’s a good script, but I would suggest checking their rank via getgroupsasync, as it does not cache like :GetRankInGroup() does. While this may not be a big issue, if a player is not a tester, and they are ranked a tester, then they must join a new server to gain access, they can’t join any previous servers because their group rank will not update to show they are a tester. The two scripts below will make it so the group rank is not cached.
Module Script
local GroupService = {}
function GroupService:GetRankInGroup(player, group)
if not player then
return false
end
for _, x in pairs(game:GetService("GroupService"):GetGroupsAsync(player.UserId)) do
if x.Id == group then
return x.Rank
end
end
return 0
end
function GroupService:GetRoleInGroup(player, group)
if not player then
return false
end
for _, x in pairs(game:GetService("GroupService"):GetGroupsAsync(player.UserId)) do
if x.Id == group then
return x.Role
end
end
return "Guest"
end
return GroupService
Kick Script
local GroupService = game:GetService("ServerScriptService"):WaitForChild("GroupService")
local GS = require(GroupService)
local minimum = 255 --minium group rank
local groupId = 12345 --GroupID
game.Players.PlayerAdded:Connect(function(plr)
if GS:GetRankInGroup(plr, groupId) < minimum then
plr:Kick("Closed Development Testing.")
end
end)