What I've tried to do is create a leaderboard stat that shows both the group that the person is home to and that person's rank in them. However, when trying to use this, the stat itself does not show (even with a blank value.
game.Players.PlayerAdded:connect(function(newPlayer)
repeat wait() until newPlayer:findFirstChild("leaderstats")
local Rank = Instance.new("StringValue", newPlayer.leaderstats)
Rank.Name = "Rank"
if newPlayer:IsInGroup(2553045) then
Rank.Value = "MRR [Host]:" + newPlayer:GetRoleInGroup(2553045)
elseif newPlayer:IsInGroup(316950) then
Rank.Value = "Fatal Redemption [Ally]" + newPlayer:GetRoleInGroup(316950)
elseif newPlayer:IsInGroup (914233) then
Rank.Value = "Allied Airborne [Enemy] + newPlayer:GetRoleInGroup(914233)
elseif newPlayer:IsInGroup() then
Rank.Value = "Visitor/Floater"
end
end)
I'm a bit new to roblox coding so just tell me if my assumptions are correct with the fact that you can't use the + to add in more text. Does anyone know how to fix this?

1 comment
Thank you so much, this is the most helpful answer that I have received. About closing the " (sorry, new to this site so I don't know how to make it like a code), I realized this shortly after making this post. Also, your line 2 doesn't appear to be needed as it seems that the script works (probably due to the parent script that is partnered with it). However, I'll keep this in mind if I make it