Group Rank Accessory

Hello! So I want to make a Group Rank Accessory, where if the player has the required rank, it will give them the accessory on their back. However, I have no idea where to start. Please help!

You can use GetRankInGroup() function to get the player’s rank id, then if they have the required rank add the accessory to their character.

You should do;

https://developer.roblox.com/en-us/api-reference/function/Player/GetRankInGroup

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		if player:GetRankInGroup(groupid) == rankid then
			character:AddAccessory(accessory) -- must be an accessory class
		end
	end)
end)

RankId is this number under each role in your group
image

How would I clone the accessory to the player? Thats a problem I ran into.

local clone = Accessory:Clone()
clone.Parent = character

It would clone the accessory (create a copy of it) and parent it to the character.