Unsure how to change someone's name if there a certain rank in a group

Hey there i have made a script that shows a players name ingame but i need it if there a certen rank in a group there name changes any help would be good thanks code:

while true do

wait()

local human = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Parent.Parent)

script.Parent.TeamColorCheck.BrickColor =human.TeamColor

script.Parent.TextColor3 = script.Parent.TeamColorCheck.Color

end

As far as I know, you can change the name displayed over the character by simply renaming the character model. I’m not sure if you can change the leaderboard name. You also cannot change the name displayed in the Esc menu.

To check player’s rank in group use:
player:GetRankInGroup(groupid) - returns a number (from 0 to 255)
player:GetRoleInGroup(groupid) - returns the rank’s name

hey there i have it in a billboard gui

Well then change the textlabel’s text instead of character name.