You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want a nametag to update when a leaderstat changes [number/value] -
What is the issue? Include screenshots / videos if possible!
It is only changing locally or not at all.
- 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)