I'm trying to automatically update a nametag so each player's tag shows their corresponding values. The issue is that when it updates the value, only you can see your value change, and everyone else has, "Loading..." above them. The reason why only you can see your name change is that I was using a Local Script. I tried using a Script thinking this would solve the problem, but you can't get the local player in a Script.
UpdateText Script
local player = game.Players.LocalPlayer
local statsFolder = player:WaitForChild("Leaderstats", 100)
local rank = statsFolder:WaitForChild("Rank")
local text = script.Parent
text.Text = "Rank "..rank.Value
rank.Changed:Connect(function()
text.Text = "Rank "..rank.Value
end)
I tried wrapping it around a game.Players.PlayerAdded Function,
game.Players.PlayerAdded:Connect(function(player)
local statsFolder = player:WaitForChild("Leaderstats", 100)
local rank = statsFolder:WaitForChild("Rank")
local text = script.Parent
text.Text = "Rank "..rank.Value
rank.Changed:Connect(function()
text.Text = "Rank "..rank.Value
end)
end)
But this didn't work...
Please help!

2 comments
Side note, I found a bug to make my view counter go up, really high and really fast...
You should have the players fire a RemoteEvent to the server when they want to change their name, from there you can change rank.Value to whatever they want.