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

Group Team Changer Scripting?

I am a dev in a SCPF and we need a new team changer, but I dont know the code where it only lets people with a specific rank in a group go on a team. Can anyone help me? I am pretty new to scripting.

1 comment

0

Use Player:GetRankInGroup() and see if its higher than the minimum required rank

1 answer

local GroupId = 000000000

lcoal MinimalRank = 50
game.Players.PlayerAdded:Connect(function(Player)
	if Player:GetRankInGroup(GroupId) >= MinimalRank then
		-- Change players team
	else
		-- Don't change players team.
	end
end)

1 comment

0

H

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