Well what you can do is when you create the leaderstats, you wanna make a value named Rank, make sure it’s a string. After that check the rank in the group. For example if the players rank number in the group is 1 then their rank will be “Member”
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder",player)
leaderstats.Name = "leaderstats"
local Rank = Instance.new("StringValue",leaderstats)
Rank.Name = "Rank"
if player:GetRankInGroup(GroupId) == RankNumber then
Rank.Value = "RankName"
end
end)
If you don’t know the ID of the group its the numbers in the URL of the group. To get the rank number you check in the group like so:
After leaderboard is made, it makes a value inside the leaderboard, for example like KOs. (In this case its called Rank)
It checks if the player is in the group and what rank they are. Once found it sets the Rank Value to whatever you want their rank to be named i.e: Member, Admin, Owner, etc.
Hopefully the images helped! (Make sure you put this in a Script, not a local script, in ServerScriptService)
No, just one script with those lines will do the job. It will update whenever you join a different team. If you get promoted or demoted in the group, you have to rejoin the game for the rank to update ingame.
I basically want my school group ranks to be a team in game. And it did not work, I don’t know what it means (groupid) on the script, do I put the group id or the group rank number?
If you change the players team via LocalScript, it won’t change on the server, only for the client. (Assuming Filtering Enabled is on, which it should be) You’ll need to create a remoteEvent for the client to tell the server to create a new team. However, I’d suggest you add some security with that as an exploiter can spam that event and create several teams which could cause the server to crash.