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

how do i make my auto team morph script detect the rank of the person in a group?

could someone help me I made an auto morph team but I wanted it to detect the rank of the person within the group and make the player get another different morph

my script is like this

			if Player.TeamColor == BrickColor.new("Black") then 
			Body(1,1,1,Character)
			MorphUser(Player,"Rank","Test","Cru Member","Morph")
			Finale(Character)
			Finale0(Character)
			end

1 answer

✓ Accepted answer

I'm gonna give you an idea on how to use :GetRankInGroup(), I'm not gonna write the entire script.

-- // Server \\ --

local Players = game:GetService("Players")
local GroupID = 2 -- // Your Group ID, it can be found in the URL bar

Players.PlayerAdded:Connect(function(plr)
	local function getRank ()
		return plr:GetRankInGroup(GroupID)
	end

	local Rank = getRank()

	if Rank == 255 then
		print("Player is the owner")
	else
		print("Player is not the owner")
	end
end)

Note that it returns the integer NUMBER of the rank, not in strings

Source:

DevHub: Player:GetRankInGroup

1 comment

0

thanks bro I managed to do it but now I have a problem with the parts that are floating.

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