Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how to give leaderbord rank ingame if plr is in group?

Hello can anyone help me I search a script if plr is in group then plr teamcolor white AND then plr role : IsIngroup pls I need help

2 answers

**local Group = 5700758 -- Your group ID local MinimumLevel = 50 -- Group rank power

local Team = "MyTeam"

game.Players.PlayerAdded:Connect(function(player) local Power = player:GetRankInGroup(Group) if tonumber(Power) >= MinimumLevel then -- if you want it to match a power use '==' print("Setting Team") player.Team = game:GetService("Teams")["MyTeam"] end return true end)**

-- Also sorry for poor formatting, I have no idea how to use this site lol

I'm not sure if this will work or not but I'm trying my best, make sure it's a script in ServerScriptService. And make sure that in your leaderstats script that the Value is a BoolValue

local groupId = -- put your group id here

game.Players.PlayerAdded:Connect(function(newPlayer)
	if newPlayer:IsInGroup(groupId) then
		newPlayer.leaderstats.RankNameHere.Value = "Group Guy" -- change "RankNameHere" with your real rank and "Group Guy" with what you want to give them.
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.