I don't see anything wrong with this code, can someone help me fix it? Basically if a player is a certain rank in a group, it changes the color to yellow. But if they are below 8, it's just white. Here is the code:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local tag = game.ServerStorage:WaitForChild("thetag"):Clone()
		tag.Parent = character.Head
		tag.TextLabel.Text = player.Name
		tag.Rank.Text = player:GetRoleInGroup(myGroupId)
		if player:GetRankInGroup(myGroupId) >= 8 then
			tag.Rank.TextColor3 = Color3.fromRGB(181, 176, 31)
			tag.Rank.TextStrokeColor3 = Color3.fromRGB(73, 74, 16)
		else
			tag.Rank.TextColor3 = Color3.fromRGB(181, 181, 181)
			tag.Rank.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
		end
	end)
end)

(I replaced the group id with "myGroupId" for privacy reasons) specifically the part where it says "GetRankInGroup >= 8 then". It just makes everyone's rank tag yellow and I don't know why. I put the else statement in an attempt to fix it, but it still wont work no matter what. The original text is white, so it's somehow making it yellow. but why? Even if it is yellow it should make the text white if they're not rank 8 or above. I'm confused...