Can someone guide me in making a script where the Player Leaderboard is not visible for all excluding those with a specific rank in a certain group? I genuinely have no idea. Any help for this?
Check if the player has the rank that you require and then remove the leaderboard from their screen by using that (this has to be in local script for example in StarterPlayerScripts).
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
You can check the rank in group using GetRankInGroup function.
The code should look like that:
local Player = game.Players.LocalPlayer;
if Player:GetRankInGroup(GROUPID) ~= RANK then
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false);
end
Players with rank == RANK will have the leaderboard visible, others not.
4 Likes
if there is a correct answer to something like @Kacper showed, could you please mark it as a solution so people do not get confused or something when someone has already answered a problem/question thanks.
2 Likes
I am yet to test it since shortly after I posted a family emergency occurred. It will be tested shortly.
ok I just wanted to let you know just in case, sorry
1 Like