Need Help Parenting A Billboard Gui

I have a Billboard Gui in StarterCharacter with a script in it that is supposed to parent it to the players Upper Torso


game.Players.PlayerAdded:Connect(function(Player)
	
	script.Parent.Title.Text = Player.Name
	script.Parent.Title.TextColor3 = Player.TeamColor
	script.Parent.Icon.Rank.Text = Player.leaderstats.Rank.Value

	script.Parent = script.Parent:WaitForChild("UpperTorso") -- Part that parents it
	Player.leaderstats.Rank.Value.Changed:Connect(function(new)
		script.Parent.Icon.Rank.Text = new
	end)
end)

What am i doing wrong?

1- is that r15?
2- try this:

game.Players.PlayerAdded:Connect(function(Player)
	
	script.Parent.Title.Text = Player.Name
	script.Parent.Title.TextColor3 = Player.TeamColor
	script.Parent.Icon.Rank.Text = Player.leaderstats.Rank.Value

	script.Parent = script.Parent:WaitForChild("UpperTorso") -- Part that parents it
	Player.leaderstats.Rank.Changed:Connect(function(new)
		script.Parent.Icon.Rank.Text = new
	end)
end)

if this one doesnt work, try out this :

game.Players.PlayerAdded:Connect(function(Player)
	
	script.Parent.Title.Text = Player.Name
	script.Parent.Title.TextColor3 = Player.TeamColor
	script.Parent.Icon.Rank.Text = Player.leaderstats.Rank.Value

	script.Parent = script.Parent:WaitForChild("UpperTorso") -- Part that parents it
	Player.leaderstats.Rank.Changed:Connect(function()
		script.Parent.Icon.Rank.Text = Player.leaderstats.Rank.Value
	end)
end)

if its r6, then use humanoidrootpart

Its R15, so do I use the first or second script?

Try both, tell me which one ends up in errors

You are parenting the script to UpperTorso, instead do script.Parent.Parent

Neither Of them end up with errors, I had to add a extra parent to the script, but both of them sadly, don’t parent to the torso

I did add a extra parent, but it still doesn’t parent

You should not just parent the script to every player that joins, instead you should clone the billboardgui and parent that to the player:

game.Players.PlayerAdded:Connect(function(Player)
	
	local billboard = script.BillboardGui:Clone()
	billboard.Title.Text = Player.Name
	billboard.Title.TextColor = Player.TeamColor
	billboard.Icon.Rank.Text = Player.leaderstats.Rank.Value
	
	Player.CharacterAdded:Connect(function(char)
		billboard.Parent = char:WaitForChild("HumanoidRootPart")
	end)
	
	Player.leaderstats.Rank.Value.Changed:Connect(function(new)
		Player.Character.HumanoidRootPart.Icon.Rank.Text = new
	end)
end)

Something like this, billboard should be inside the script, also i tried parenting it to UpperTorso but it just doesnt work, besides if its a title you should parent it to the Head or HumanoidRootPart.