I made a script for my roblox military group's game, where there is a leaderstats which states your rank in a specific group. because the leaderboard cannot hold the whole name such as the rank "Chief of Defence" because of that i want to change it to COD instead which stands for my rank name. I would like to do this with all the ranks in the group with the script but i do not know how tp make the text an abreviation with your rank and i cannot find any ways to help me with this, please help.
Here is my program so far:
groupid = 8298204
function added (player)
local ls = Instance.new("IntValue")
ls.Name = "leaderstats"
local role = Instance.new("StringValue")
role.Name = "Rank"
role.Value = player:GetRoleInGroup(groupid)
ls.Parent = player
role.Parent = ls
end
game.Players.PlayerAdded:Connect(added)
