How to make my Player Nametags update for everyone live [Leaderstat issue]

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want a nametag to update when a leaderstat changes [number/value]

  2. What is the issue? Include screenshots / videos if possible!

It is only changing locally or not at all.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

Tried local script it showed it only to one user.

Click to see code

> Open Code.
local template = game.StarterGui.NameTag
game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local Hd = Character.Head
		local NameTag = template:Clone()	
		NameTag.Parent = Hd
		NameTag.Adornee = Hd
		
		Character.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
		
		local lval = Player.status.launches
		local username = Player.Name
		local dispname = Player.DisplayName
		
		lval.Changed:Connect(function()
			Character.Head.NameTag.launches.Text = "Launches: " .. lval.Value
		end)
		
		NameTag.launches.Text = "Launches: " .. lval.Value
		NameTag.Username.Text = username
		NameTag.displayname.Text = "@" .. dispname
		
		if NameTag.Parent == Hd then
			print("given.")
		end
		
		while true do
				math.randomseed(tick())
				local rColor = Color3.new(math.random(),math.random(),math.random())
			for i = 0 ,1, .05 do
					NameTag.top.BackgroundColor3 = NameTag.bottom.BackgroundColor3:lerp(rColor,i) -- RGB
					NameTag.bottom.BackgroundColor3 = NameTag.top.BackgroundColor3:lerp(rColor,i) -- RGB		
				wait()
				end
				wait(.01)
			end
	end)

end)
2 Likes

it is on the server… lol still only the one player sees it.

You are storing the template in StarterGui. Store it in replicated storage instead and give it a try.

Ok i will try that now, i do not think it will change though.