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!
Live updating value.
What is the issue? Include screenshots / videos if possible!
Error:
ServerScriptService.Script:23: attempt to index number with 'GetPropertyChangedSignal'
What solutions have you tried so far?
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
local lval = Player.status.launches.Value
local username = Player.Name
local dispname = Player.DisplayName
NameTag.launches.Text = "Launches: " .. lval
NameTag.Username.Text = username
NameTag.displayname.Text = "@" .. dispname
if NameTag.Parent == Hd then
print("given.")
end
lval:GetPropertyChangedSignal("Value"):Connect(function()
NameTag.launches.Text = "Launches: " .. lval
end)
print("rgb")
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)
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
NameTag.launches.Text = "Launches: " .. lval.Value
NameTag.Username.Text = username
NameTag.displayname.Text = "@" .. dispname
if NameTag.Parent == Hd then
print("given.")
end
lval.Changed:Connect(function()
NameTag.launches.Text = "Launches: " ..lval
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)
You need to update the text from the client, because if you look at the text from the server it will look right but the client doesn’t know about it, here is a metaphor.
Say you have art at an art museum and people come and take a picture, but you keep drawing on the picture, those people who took the picture don’t have an updated photo of what it looks like now
You update it from the client, if I were you I would use a stringValue and make a local script that detects for the stringValue’s value to change, and set the textlabel.text to the stringValue’s value, I have explained multiple times.